Reputation: 46796
Basically, what I want is
git diff HEAD branch1 -- foo.txt > patch.txt;
git apply patch.txt
How do I do this in one step?
And, side question: How can I specify a mask for files, like, **/*.xml
?
Upvotes: 0
Views: 67
Reputation: 18430
You can check out individual files from branches (well, any commit) like this:
git checkout branch1 -- foo.txt
Upvotes: 3