git: Get a single file from another repository
By admin
This is so easy it's almost stupid. Let's say want to copy a single file from b0 to another branch, b1, without doing a merge and all that crap. all you do is this:
# change to b1
get-checkout b1
# checkout the single file
git-checkout b0 path/to/file
Then you can do something like to see the differences:
git-diff HEAD path/to/file
and when you are done:
git-commit -m “Commit it, baby” path/to/file
“Commit it, baby” as a comment is mandatory.



September 25th, 2008