diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-30 14:07:45 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-30 14:07:45 +0900 |
commit | a8858316fb3186e69d324183d9af58ef55dfb794 (patch) | |
tree | 4f60790af5953a6a07e822d2b92123ac3263ed3c /git-rebase.html | |
parent | cb705397f111dc1fcb3e3fa844bfd5b3050dee38 (diff) | |
download | git-htmldocs-a8858316fb3186e69d324183d9af58ef55dfb794.tar.gz |
Autogenerated HTML docs for v2.23.0-385-gbc129
Diffstat (limited to 'git-rebase.html')
-rw-r--r-- | git-rebase.html | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/git-rebase.html b/git-rebase.html index 606e2a778..2abbf7ecc 100644 --- a/git-rebase.html +++ b/git-rebase.html @@ -749,8 +749,8 @@ git-rebase(1) Manual Page <h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<pre class="content"><em>git rebase</em> [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>]
- [<upstream> [<branch>]]
+<pre class="content"><em>git rebase</em> [-i | --interactive] [<options>] [--exec <cmd>]
+ [--onto <newbase> | --keep-base] [<upstream> [<branch>]]
<em>git rebase</em> [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>]
--root [<branch>]
<em>git rebase</em> (--continue | --skip | --abort | --quit | --edit-todo | --show-current-patch)</pre>
@@ -1056,6 +1056,26 @@ merge base of A and B if there is exactly one merge base. You can leave out at most one of A and B, in which case it defaults to HEAD.</p></div>
</dd>
<dt class="hdlist1">
+--keep-base
+</dt>
+<dd>
+<p>
+ Set the starting point at which to create the new commits to the
+ merge base of <upstream> <branch>. Running
+ <em>git rebase --keep-base <upstream> <branch></em> is equivalent to
+ running <em>git rebase --onto <upstream>… <upstream></em>.
+</p>
+<div class="paragraph"><p>This option is useful in the case where one is developing a feature on
+top of an upstream branch. While the feature is being worked on, the
+upstream branch may advance and it may not be the best idea to keep
+rebasing on top of the upstream but to keep the base commit as-is.</p></div>
+<div class="paragraph"><p>Although both this option and --fork-point find the merge base between
+<upstream> and <branch>, this option uses the merge base as the <em>starting
+point</em> on which new commits will be created, whereas --fork-point uses
+the merge base to determine the <em>set of commits</em> which will be rebased.</p></div>
+<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
+</dd>
+<dt class="hdlist1">
<upstream>
</dt>
<dd>
@@ -1338,6 +1358,9 @@ details).</p></div> ends up being empty, the <upstream> will be used as a fallback.</p></div>
<div class="paragraph"><p>If either <upstream> or --root is given on the command line, then the
default is <code>--no-fork-point</code>, otherwise the default is <code>--fork-point</code>.</p></div>
+<div class="paragraph"><p>If your branch was based on <upstream> but <upstream> was rewound and
+your branch contains commits which were dropped, this option can be used
+with <code>--keep-base</code> in order to drop those commits from your branch.</p></div>
</dd>
<dt class="hdlist1">
--ignore-whitespace
@@ -1653,6 +1676,16 @@ used to override and disable this setting.</p></div> --preserve-merges and --rebase-merges
</p>
</li>
+<li>
+<p>
+--keep-base and --onto
+</p>
+</li>
+<li>
+<p>
+--keep-base and --root
+</p>
+</li>
</ul></div>
</div>
</div>
@@ -2219,7 +2252,8 @@ Hard case: The changes are not the same. This happens if the <em>subsystem</em> rebase had conflicts, or used
<code>--interactive</code> to omit, edit, squash, or fixup commits; or
if the upstream used one of <code>commit --amend</code>, <code>reset</code>, or
- <code>filter-branch</code>.
+ a full history rewriting command like
+ <a href="https://github.com/newren/git-filter-repo"><code>filter-repo</code></a>.
</p>
</dd>
</dl></div>
@@ -2261,7 +2295,7 @@ correspond to the ones before the rebase.</p></div> </tr></table>
</div>
<div class="paragraph"><p>The idea is to manually tell <em>git rebase</em> "where the old <em>subsystem</em>
-ended and your <em>topic</em> began", that is, what the old merge-base
+ended and your <em>topic</em> began", that is, what the old merge base
between them was. You will have to find a way to name the last commit
of the old <em>subsystem</em>, for example:</p></div>
<div class="ulist"><ul>
@@ -2451,7 +2485,7 @@ Use <code>--rebase-merges</code> in such scenarios instead.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2019-09-18 12:25:17 PDT
+ 2019-09-30 14:04:22 JST
</div>
</div>
</body>
|