X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fgit-rebase.txt;h=f037d1280eb629339d82bb1eabf0ede7a1e25708;hb=5ca5396c9ecba947c8faac7673195d309a6ba2ea;hp=09bd3289e978d6f1530b6405b7990e89b9d54d19;hpb=215a7ad1ef790467a4cd3f0dcffbd6e5f04c38f7;p=git.git diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 09bd3289..f037d128 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -7,14 +7,54 @@ git-rebase - Rebase local commits to new upstream head. SYNOPSIS -------- -'git-rebase' [] +'git-rebase' [--onto ] [] DESCRIPTION ----------- -Rebases local commits to the new head of the upstream tree. +git-rebase applies to (or optionally to ) commits +from that do not appear in . When is not +specified it defaults to the current branch (HEAD). + +When git-rebase is complete, will be updated to point to the +newly created line of commit objects, so the previous line will not be +accessible unless there are other references to it already. + +Assume the following history exists and the current branch is "topic": + + A---B---C topic + / + D---E---F---G master + +From this point, the result of the following commands: + + git-rebase master + git-rebase master topic + +would be: + + A'--B'--C' topic + / + D---E---F---G master + +While, starting from the same point, the result of the following +commands: + + git-rebase --onto master~1 master + git-rebase --onto master~1 master topic + +would be: + + A'--B'--C' topic + / + D---E---F---G master OPTIONS ------- +:: + Starting point at which to create the new commits. If the + --onto option is not specified, the starting point is + . + :: Upstream branch to compare against. @@ -31,5 +71,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite