Rebasing

suggest change

Syntax

Parameter Details
--continue Restart the rebasing process after having resolved a merge conflict.
--abort Abort the rebase operation and reset HEAD to the original branch. If a branch was given when the rebase started, HEAD is reset to that branch. Otherwise HEAD is reset to where it was when the rebase started.
--keep-empty Keep commits that do not change anything from their parents.
--skip Restart the rebase by skipping the current patch.
-m, --merge Use merging strategies to rebase. When the recursive (default) merge strategy is used, this allows rebase to be aware of renames on the upstream side. Note that a rebase merge works by replaying each commit from the working branch on top of the upstream branch. Because of this, when a merge conflict happens, the side reported as ours is the so-far rebased series, starting with upstream, and theirs is the working branch. In other words, the sides are swapped.
--stat Show a diffstat of what changed upstream since the last rebase. The diffstat is also controlled by the configuration option rebase.stat.
-x, --exec command Perform interactive rebase, stopping between each commit and executing command

Keep in mind that rebase rewrites the repository history.

Rebasing commits that are already on the remote rewrites history other people may have based work on. Unless you really know what you are doing, rebase before you push.

Rebase local branch

Rebase ours and theirs local and remote

Interactive rebase

Rebase down to the initial commit

Configure autostash

Rebase before a code review

Test all commits during rebase

Set up git pull to rebase instead of merge

Abort an interactive rebase

Pushing after a rebase

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents