2

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?

1
  • you can use "gitk --all" to check if every checkin works all right. DO remember every branch is clean before u do the merge Commented May 21, 2013 at 2:33

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

That actually copies files from master to develop.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.