enricojoerns.de

Checkout single files from any remote repository to local repository

25.10.2013

Add remote repository (anyname can be any name)

git remote add anyname https://github.com/user/repo.git

Optional: verify

git remote -v

Fetch remotes

git fetch anyname

checkout files

git checkout source_branch <paths>...

commite/merge

git commit

Sources:
https://help.github.com/articles/adding-a-remote
http://stackoverflow.com/questions/5250504/git-working-with-remote-merges
http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/