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)"?
To resolve a conflict do one of three things: Merge the conflicted text by hand (by examining and editing the conflict markers within the file). Copy one of the temporary files on top of the working file. Run svn revert FILENAME to throw away all of the local changes.
Since 1.6 version SVN recognizes a new kind of conflict, known as a "tree conflict". Such conflicts manifest at the level of directory structure, rather than file content. Situations now flagged as conflicts include deletions of locally modified files, and incoming edits to locally deleted files.
While doing a git svn rebase
, if you have merge conflicts here are some things to remember:
1) If anything bad happens while performing a rebase you will end up on a (no-branch)
branch.
2) If you run git status
, you'll see a .dotest
file in your working directory. This is safe to ignore.
3) If you want to abort the rebase use the following command.1
git rebase --abort
4) If you have a merge conflict:
git add [file]
git rebase --continue
2git add
?", then the edits turned the conflict into a no-op change3. Continue with git rebase --skip
You may have to repeat this process until the rebase is complete. At any point you can git rebase --abort
to cancel and abandon the rebase.
1: There is no --abort
option for git svn rebase
.
2: There is no --continue
option for git svn rebase
.
3: This is very strange, but the files are in a state where git thinks they are the same after that particular patch. The solution is to "skip" that patch on the rebase.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With