2

I have a bit of an odd issue with a repo. I have a branch by another dev, called other, and I just merged into master some refactors that involved renaming a bunch of files.

         [other]      /->[normal commits]-----------------\
                     /                                     \
[master] (old)->(old)->---------->[potential file changes]--->[potentially difficultmerge due to potential file changes]
                               /
[otherbranch] [massive rename]/

Can I change their contents in a later commit (actually java package identification) before merging other without having to do nasty resolution of these renames? The files in question are modified in other quite a bit.

Edit: Git-merge with recursive and patience should be able to pick up the merge nicely if it's not renamed, so would the same logic apply to renames?

nanofarad
  • 40,330
  • 4
  • 86
  • 117
  • Why don't you just revert your merge, merge 'other' and then merge your branch again? – the.malkolm Aug 01 '13 at 14:57
  • @the.malkolm You're talking about reverting the merge of the renames, merging `other`, and remerging the renames afterward? It seems like it should work.. Can you add it as an answer? – nanofarad Aug 01 '13 at 15:06

1 Answers1

2

Why don't you just revert 'rename' merge, merge 'other' and then merge 'rename' again? Not the perfect solution but should work right here and right now.

Take a look here to figure out how to correctly revert a merge Undo a Git merge that hasn't been pushed yet

Community
  • 1
  • 1
the.malkolm
  • 2,391
  • 16
  • 16