Mercurial > hg
comparison hgext/rebase.py @ 22790:c64f9e0beead
rebase: add help examples
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 08 Oct 2014 14:03:07 -0500 |
parents | 5f4934487382 |
children | 103dcfbb385f |
comparison
equal
deleted
inserted
replaced
22789:5f4934487382 | 22790:c64f9e0beead |
---|---|
126 the intended source branch). | 126 the intended source branch). |
127 | 127 |
128 If a rebase is interrupted to manually resolve a merge, it can be | 128 If a rebase is interrupted to manually resolve a merge, it can be |
129 continued with --continue/-c or aborted with --abort/-a. | 129 continued with --continue/-c or aborted with --abort/-a. |
130 | 130 |
131 .. container:: verbose | |
132 | |
133 Examples: | |
134 | |
135 - move "local changes" (current commit back to branching point) | |
136 to the current branch tip after a pull:: | |
137 | |
138 hg rebase | |
139 | |
140 - move a single changeset to the stable branch:: | |
141 | |
142 hg rebase -r 5f493448 -d stable | |
143 | |
144 - splice a commit and all its descendants onto another part of history:: | |
145 | |
146 hg rebase --source c0c3 --dest 4cf9 | |
147 | |
148 - rebase everything on a branch marked by a bookmark onto the | |
149 default branch:: | |
150 | |
151 hg rebase --base myfeature --dest default | |
152 | |
153 - collapse a sequence of changes into a single commit:: | |
154 | |
155 hg rebase --collapse -r 1520:1525 -d . | |
156 | |
157 - move a named branch while preserving its name:: | |
158 | |
159 hg rebase -r "branch(featureX)" -d 1.3 --keepbranches | |
160 | |
131 Returns 0 on success, 1 if nothing to rebase or there are | 161 Returns 0 on success, 1 if nothing to rebase or there are |
132 unresolved conflicts. | 162 unresolved conflicts. |
163 | |
133 """ | 164 """ |
134 originalwd = target = None | 165 originalwd = target = None |
135 activebookmark = None | 166 activebookmark = None |
136 external = nullrev | 167 external = nullrev |
137 state = {} | 168 state = {} |