What is the best way to resolve a conflict when doing a "git svn rebase", and the git branch you are on becomes "(no-branch)"?
+6
A:
You can use git mergetool
to view and edit the conflicts in the usual fashion. Once you are sure the conflicts are resolved do git rebase --continue
to continue the rebase, or if you don't want to include that revision do git rebase --skip
1800 INFORMATION
2008-09-22 02:08:32
awesome, helped me out
orip
2010-01-03 17:35:45
+31
A:
After some googling I found a good answer on Larry's blog (Thanks Larry):
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.
csexton
2008-09-22 02:11:01