How do you merge just one or few selected files from one branch to another without going through the branch merge, manually brute force or ete etc hacks?
Well I had my head scratching over for few hours and found nice way to do that.
git checkout seems to be the best choice we have.
Assume you are in
master branch and want to merge from
dev_i3 branch, use this syntax:
git checkout <BRANCH_NAME> <PATH_OF_FILE>
git checkout dev_i3 views/shared/nav.cshtml
If you wish to merge multiple selective files at once:
git checkout <BRANCH_NAME> <PATH_OF_FILE_1> <PATH_OF_FILE_2> <PATH_OF_FILE_3>
Once you perform this, that particular file from
dev_i3 branch would be added to
I read that here: http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/
fatal: refusing to merge unrelated histories