I did a large merge from develop to master and Git handled it mostly correctly. But there were three files that definitely existed in both branches prior to the merge but Git only recognized the old ones in master, as they were all marked as added by us. I expected instead to get a conflict I could resolve, because I wanted the changes that exist in develop. The only thing it would let me do to resolve it was either add them (meaning I'd be keeping the old master version or remove them. I choose the latter and attempted another merge, but it says I'm already up-to-date. Now the files exist in develop but not in master, but Git seems to have no clue about this. Why won't Git let me bring these files over and what can I do to resolve this?
- you can use "gitk --all" to check if every checkin works all right. DO remember every branch is clean before u do the mergeGavin– Gavin2013-05-21 02:33:11 +00:00Commented May 21, 2013 at 2:33
Add a comment |
1 Answer
So there are 3 files in develop that you want in master. Try this
git checkout master # make sure you are on the master branch git checkout develop -- name_of_file_1.ext name_of_file_2.ext name_of_file_3.ext This should bring over the 3 files you want from develop in their most recent state.
1 Comment
Arjan
That actually copies files from master to develop.