6 git-rebase - Rebase local commits to new upstream head
10 'git-rebase' [--onto <newbase>] <upstream> [<branch>]
14 git-rebase applies to <upstream> (or optionally to <newbase>) commits
15 from <branch> that do not appear in <upstream>. When <branch> is not
16 specified it defaults to the current branch (HEAD).
18 When git-rebase is complete, <branch> will be updated to point to the
19 newly created line of commit objects, so the previous line will not be
20 accessible unless there are other references to it already.
22 Assume the following history exists and the current branch is "topic":
28 From this point, the result of either of the following commands:
31 git-rebase master topic
39 While, starting from the same point, the result of either of the following
42 git-rebase --onto master~1 master
43 git-rebase --onto master~1 master topic
51 In case of conflict, git-rebase will stop at the first problematic commit
52 and leave conflict markers in the tree. After resolving the conflict manually
53 and updating the index with the desired resolution, you can continue the
56 git am --resolved --3way
58 Alternatively, you can undo the git-rebase with
60 git reset --hard ORIG_HEAD
66 Starting point at which to create the new commits. If the
67 --onto option is not specified, the starting point is
71 Upstream branch to compare against.
74 Working branch; defaults to HEAD.
78 Written by Junio C Hamano <junkio@cox.net>
82 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
86 Part of the gitlink:git[7] suite