git divergent renaming

Posted by pablo on Stack Overflow See other posts from Stack Overflow or by pablo
Published on 2011-01-13T12:17:15Z Indexed on 2011/01/14 9:53 UTC
Read the original article Hit count: 194

Filed under:
|

Hi,

I'd like to know how you handle a situation like this in Git:

  • create branch task001 from master
  • master: modify foo.c and rename it to bar.c
  • task001: modify foo.c and rename it to moo.c
  • merge task001 to master

What Git tells me is:

CONFLICT (rename/rename): Rename "foo.c"->"bar.c" in branch "HEAD" rename "foo.cs"->"moo.c" in "task001"
Automatic merge failed; fix conflicts and then commit the result.

How should I solve it? I mean, I still want to merge the two files once the name conflict is resolved.

Thanks.

© Stack Overflow or respective owner

Related posts about git

Related posts about version-control