I have migrated my svn repository to a git repository on a local developer machine. So master is now tracking svn trunk. I wanted svn trunk
to be develop
branch in git which I have accomplished by renaming the branch in git.
I keep synchronizing the changes made in svn trunk to git by issuing git svn fetch
and git svn rebase
. This is working really well.
The folder structure in svn repo and hence in git repo is as below
s-online/
├── .git
└── Online
├── config
│ ├── build
│ ├── dataload
│ ├── export
│ ├── http
│ ├── search
│ ├── web
│ └── webservice
└── workspace
├── data
├── logic
├── site
├── stores
└── tools
I want to modify the folder structure in my git repo to look like the one below. So, essentially, move everything inside workspace folder under Online folder.
s-online/
├── .git
└── data
├── logic
├── site
├── stores
└── tools
├── config
├── build
├── dataload
├── export
├── http
├── search
├── web
└── webservice
Some developers want to start using git as of today for new development whereas other developers who are still committing to svn will take a while to transition to git completely.
Until then, the challenge is to be able to synchronize commits from svn trunk to my git repo (modified folder structure) for some time.
When I perform git svn fetch
followed by git svn rebase
, the rebase takes a while (understandably because my changes to the folder structure needs to be applied on top of the svn commits). However, for all the files that are committed to svn (since the folder restructure in git), I am getting conflicts for all those files during rebase.
I am not sure why there are conflicts on all files committed to svn in the first place as all I have done is to reorganize the folder structure in git?
Is there something I am missing?
There might be something else missing, but generally you should keep the structure and the files in sync both sides as long as you have active commits to svn. It is also better to restrain from the merge commits on git side, as they might complicate git svn rebase
unless you squash those merges beforehand.