]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-rebase.txt
Document the default source of template files.
[thirdparty/git.git] / Documentation / git-rebase.txt
CommitLineData
215a7ad1
JH
1git-rebase(1)
2=============
7fc9d69f
JH
3
4NAME
5----
7bd7f280 6git-rebase - Rebase local commits to new upstream head
7fc9d69f
JH
7
8SYNOPSIS
9--------
69a60af5 10'git-rebase' [--onto <newbase>] <upstream> [<branch>]
7fc9d69f
JH
11
12DESCRIPTION
13-----------
69a60af5
CW
14git-rebase applies to <upstream> (or optionally to <newbase>) commits
15from <branch> that do not appear in <upstream>. When <branch> is not
16specified it defaults to the current branch (HEAD).
17
18When git-rebase is complete, <branch> will be updated to point to the
19newly created line of commit objects, so the previous line will not be
20accessible unless there are other references to it already.
21
22Assume the following history exists and the current branch is "topic":
23
24 A---B---C topic
25 /
26 D---E---F---G master
27
28From this point, the result of the following commands:
29
30 git-rebase master
31 git-rebase master topic
32
33would be:
34
35 A'--B'--C' topic
36 /
37 D---E---F---G master
38
39While, starting from the same point, the result of the following
40commands:
41
42 git-rebase --onto master~1 master
43 git-rebase --onto master~1 master topic
44
45would be:
46
47 A'--B'--C' topic
48 /
49 D---E---F---G master
7fc9d69f
JH
50
51OPTIONS
52-------
69a60af5
CW
53<newbase>::
54 Starting point at which to create the new commits. If the
55 --onto option is not specified, the starting point is
56 <upstream>.
57
52a22d1e
LAS
58<upstream>::
59 Upstream branch to compare against.
7fc9d69f 60
52a22d1e
LAS
61<head>::
62 Working branch; defaults to HEAD.
7fc9d69f
JH
63
64Author
65------
66Written by Junio C Hamano <junkio@cox.net>
67
68Documentation
69--------------
70Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
71
72GIT
73---
a7154e91 74Part of the gitlink:git[7] suite
7fc9d69f 75