Question

Last week, I converted our svn repository to git, which took about 4 days to run. Our initial plan was to run the script during the weekend and switch to git on monday, but due to the size of our repository this proved to be impossible.

We're now thinking about keeping the test-run online and just adding the latest svn commits to the git, but I'm running into some problems. I don't have that much experience with either, so all of the commands I found were thanks to SO and Google.

The last commit that was converted to git was 69488 so I would have to get every commit since 69489. The first thing I did was (thank to this thread):

git svn clone -r69489 svn-repo
cd repo
git svn rebase

But now I'm pretty much stuck. The logical next step (in my head) seems to be to tell the new local git repo where the remote bitbucket repository is and merge the two:

git remote add origin bitbucket-path
git pull origin master
git push origin master

But when I do this, I get merge conflicts that can't be automatically resolved, which seems strange to me since git should know what to do... Am I missing something or am I going to have to go through a ton of files manually to remove the conflicts?

Was it helpful?

Solution

You don't have to do anything special. Just do a git svn init ... && git svn fetch ... for the initial import. After that you can call git svn rebase, which just adds the new commits to the git repository.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top