git-svn and rebasing refactored (moved) content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a question regarding git rebase operation when content was moved. I have
the problem when I transfer stuff from a subversion repo into my git repo, but
I wouldn't know the solution even if it would be a pure git scenario. Here is
the problem:

There is a SVN repository "Source" containing that files
"Source":
project/feat1/A.java
project/feat1/B.java
project/C.java

There is git repository "Target" where I work. That repository get's updates
from "Source" by 'git-svn migrate ...'. I had to move the files coming from
"Source" (using 'git mv'). I just moved but did not (and will not in future)
modify the files of "Source". Additionally I added my own new files. The state
of target is:
"Target":
project/src/feat1/A.java (renamed file)
project/src/feat1/B.java (renamed file)
project/src/C.java (renamed file)
project/pom.xml (created file)

Ideally from time to time I would like to rebase my work I do in "Target" on
the latest state of "Source". I use "git rebase ..." for that. But this
sometimes fails. If in "Source" files are only modified everything works fine.
E.g. modifications to "Source":project/feat1/A.java are visible in
"Target":project/src/feat1/A.java.  That's great!

But the rebase fails with conflicts when things are moved or deleted in
"Source". E.g. if "Source":project/feat1/A.java becomes
"Source":project/feat2/A.java and I merge that commit into my branch in
"Target" I get 

> CONFLICT (rename/rename): Rename
> "project/feat1/A.java"->"project/feat2/A.java" in branch "HEAD" rename
> "project/feat1/A.java"->"project/src/feat1/A.java " ...

I do understand the conflict but I am asking whether there is a better way to
use git so that I can get around these merge problems.

Ciao
  Chris
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]