diff options
author | Carl Worth <cworth@cworth.org> | 2006-02-21 17:10:12 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-21 17:45:32 -0800 |
commit | 69a60af5d0a84c4a7af907eba87f42dd6fb3c6e1 (patch) | |
tree | f981886d6a1c9b022ac079a46204ef07a9362d35 /git-rebase.sh | |
parent | 664368886781b7c070233c002597b84628eec571 (diff) | |
download | git-69a60af5d0a84c4a7af907eba87f42dd6fb3c6e1.tar.gz |
git-rebase: Clarify usage statement and copy it into the actual documentation.
I found a paper thin man page for git-rebase, but was quite happy to
see something much more useful in the usage statement of the script
when I went there to find out how this thing worked. Here it is
cleaned up slightly and expanded a bit into the actual documentation.
Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 21c3d83c3a..211bf68968 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -4,24 +4,28 @@ # USAGE='[--onto <newbase>] <upstream> [<branch>]' -LONG_USAGE='If <branch> is specified, switch to that branch first. Then, -extract commits in the current branch that are not in <upstream>, -and reconstruct the current on top of <upstream>, discarding the original -development history. If --onto <newbase> is specified, the history is -reconstructed on top of <newbase>, instead of <upstream>. For example, -while on "topic" branch: +LONG_USAGE='git-rebase applies to <upstream> (or optionally to <newbase>) commits +from <branch> that do not appear in <upstream>. When <branch> is not +specified it defaults to the current branch (HEAD). + +When git-rebase is complete, <branch> 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. + +Assuming the following history: A---B---C topic / D---E---F---G master - $ '"$0"' --onto master~1 master topic +The result of the following command: -would rewrite the history to look like this: + git-rebase --onto master~1 master topic + would be: - A'\''--B'\''--C'\'' topic - / + A'\''--B'\''--C'\'' topic + / D---E---F---G master ' |