git-bisect-rebase1
Rebase a branch bisecting to find conflicting commits
Usage
git bisect-rebase
[option ...]
[upstream
[branch]]
git bisect-rebase
[{--abort | --continue | --quit}]
Overview
git-bisect-rebase(1) rebases branch on top of upstream progressively, stopping at each commit from upstream which introduces a conflict.
It uses git-bisect(1) to find the conflicts efficiently, and git-rebase(1) to perform the rebase operations.
Parameters
upstream and branch are interpreted as if by git-rebase(1).
Options
Mode options
-
--abort -
Abort the bisect-rebase operation and reset HEAD to the original branch.
-
--continue -
Restart the bisect-rebase process after having resolved a rebase conflict.
-
--quit -
Abort the bisect-rebase operation, but HEAD is not reset.
git-bisect(1) options
The following options are interpreted as if by git-bisect(1).
-
--first-parent
git-rebase(1) options
The following options are interpreted as if by git-rebase(1).
--rebase-merges[=arg]
-r
--no-rebase-merges
--apply
--empty=arg
--[no-]keep-empty
--[no-]reapply-cherry-picks
--[no-]allow-empty-message
--merge
-m
--strategy=arg
-sarg
--strategy-option=arg
-Xarg
--[no-]rerere-autoupdate
--gpg-sign[=arg]
-Sarg
--no-gpg-sign
--quiet
-q
--verbose
-v
--[no-]stat
-n
--[no-]verify
-Carg
--no-ff
--force-rebase
-f
--[no-]ignore-whitespace
--[no-]update-refs
--exec=arg
-xarg
Other options
-
--pre-exec=cmd -
Run cmd at the target commit found by git-bisect(1), before every git-rebase(1) operation. The exit code will be interpreted as if by git bisect run cmd.
-
--post-exec=cmd -
Run cmd after a git-rebase(1) operation finishes successfully. The exit code will be interpreted as if by git bisect run cmd.
Examples
Rebasing a single branch
Algorithm for rebasing a branch 'x' on top of 'master'.
git bisect-rebase master x; # if no conflicts, done # loop: # resolve conflicts git rebase --continue; git bisect-rebase --continue; # ... rinse and repeat (goto loop)
Rebasing a tree of branches
Algorithm for rebasing a tree of branches on top of 'master'. Consider a branch 'A', with two childs 'B' and 'C'.
# loop: git bisect-rebase master A; # if no conflicts, goto children git rebase --abort; git bisect-rebase --quit; # children: git bisect-rebase A B; # follow algorithm for single branch with master=A and x=B git bisect-rebase A C; # follow algorithm for single branch with master=A and x=C # if 'goto children' above, done git tag tmpA; git bisect-rebase master A; # resolve conflicts git rebase --continue; git bisect-rebase --quit; git rebase --onto A tmpA B; # resolve conflicts, if any git rebase --onto A tmpA C; # resolve conflicts, if any git tag -d tmpA; # ... rinse and repeat (goto loop)