Autogenerated man pages for v1.2.4-gb0a3de4
[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
80 In case of conflict, git\-rebase will stop at the first problematic commit and leave conflict markers in the tree\&. After resolving the conflict manually and updating the index with the desired resolution, you can continue the rebasing process with
81
82 .nf
83 git am \-\-resolved \-\-3way
84 .fi
85
86
87 Alternatively, you can undo the git\-rebase with
88
89 .nf
90 git reset \-\-hard ORIG_HEAD
91 rm \-r \&.dotest
92 .fi
93
94 .SH "OPTIONS"
95
96 .TP
97 <newbase>
98 Starting point at which to create the new commits\&. If the \-\-onto option is not specified, the starting point is <upstream>\&.
99
100 .TP
101 <upstream>
102 Upstream branch to compare against\&.
103
104 .TP
105 <branch>
106 Working branch; defaults to HEAD\&.
107
108 .SH "AUTHOR"
109
110
111 Written by Junio C Hamano <junkio@cox\&.net>
112
113 .SH "DOCUMENTATION"
114
115
116 Documentation by Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
117
118 .SH "GIT"
119
120
121 Part of the \fBgit\fR(7) suite
122