Autogenerated man pages for v1.2.4-g5a1f
[git.git] / man1 / git-rebase.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-REBASE" 1 "" "" ""
21 .SH NAME
22 git-rebase \- Rebase local commits to new upstream head
23 .SH "SYNOPSIS"
24
25
26 \fIgit\-rebase\fR [\-\-onto <newbase>] <upstream> [<branch>]
27
28 .SH "DESCRIPTION"
29
30
31 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)\&.
32
33
34 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\&.
35
36
37 Assume the following history exists and the current branch is "topic":
38
39 .nf
40       A\-\-\-B\-\-\-C topic
41      /
42 D\-\-\-E\-\-\-F\-\-\-G master
43 .fi
44
45
46 From this point, the result of either of the following commands:
47
48 .nf
49 git\-rebase master
50 git\-rebase master topic
51 .fi
52
53
54 would be:
55
56 .nf
57               A'\-\-B'\-\-C' topic
58              /
59 D\-\-\-E\-\-\-F\-\-\-G master
60 .fi
61
62
63 While, starting from the same point, the result of either of the following commands:
64
65 .nf
66 git\-rebase \-\-onto master~1 master
67 git\-rebase \-\-onto master~1 master topic
68 .fi
69
70
71 would be:
72
73 .nf
74           A'\-\-B'\-\-C' topic
75          /
76 D\-\-\-E\-\-\-F\-\-\-G master
77 .fi
78
79 .SH "OPTIONS"
80
81 .TP
82 <newbase>
83 Starting point at which to create the new commits\&. If the \-\-onto option is not specified, the starting point is <upstream>\&.
84
85 .TP
86 <upstream>
87 Upstream branch to compare against\&.
88
89 .TP
90 <branch>
91 Working branch; defaults to HEAD\&.
92
93 .SH "AUTHOR"
94
95
96 Written by Junio C Hamano <junkio@cox\&.net>
97
98 .SH "DOCUMENTATION"
99
100
101 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
102
103 .SH "GIT"
104
105
106 Part of the \fBgit\fR(7) suite
107