Larry vs. the Git Rebase Merge Conflict
Posted by Larry Karnowski Tue, 10 Jun 2008 12:30:00 GMT
While doing a "git svn rebase", if you have merge conflicts here are some things to remember:
- While doing a rebase, if anything bad happens, you end up on a "(no-branch)" branch.
- When doing a "git status", you'll see a ".dotest" file in your working directory. Just ignore it.
- If you want to bail, do a "git rebase --abort". (Note there is no "git svn rebase --abort".)
- Fix the merge conflict file manually, then do a "git add [file]".
- Next do a "git rebase --continue". (Note there's no "svn" version of this either.)
- If it complains about "did you forget to call 'git add'?", then evidently your edit turned the conflict into a no-op change. Do a "git rebase --skip" to skip it. (Very weird, but true.)
- Rinse and repeat until the lather is gone, your scalp silky smooth, and the rebase is complete. At any time you can "git rebase --abort" to bail.
What happened to me? Well, I didn't realize what was going on, continued to work on the "not a branch" branch, commited changes, even dcommited changes back to Subversion. It was ugly, but not insurmountable. A buddy clued me into the "not a branch" situation, I was able to get back to my real branch and resurrect my code. It took a few "git rebase --continue" commands, and a tense moment around a "git rebase --skip", but now everything's hunky dory.
This very odd email really helped me a lot. You might be interested at some point.