Pull single file on server

2019-02-19 05:07发布

问题:

I have committed several files on GitHub but I want to pull only single file on server. How can I do that using PuTTY?

回答1:

git fetch
git checkout -m revision  -- the/file/you/want
git add the/file/you/want
git commit

checkout the file you want and merge it with the current one



回答2:

You can grab a single file via this URL:

https://raw.github.com/USER/PROJECT/BRANCH/FILE