git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] rebase docs: recommend `-r` over `-p`

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
May 28, 2019, 12:42 UTC
Message-ID
<363da05a66360d2b5f31391878f08dcf81b04915.1559047333.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.227.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

The `--preserve-merges` option is now deprecated in favor of `--rebase-merges`; Let's stop recommending the former.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Documentation/git-rebase.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index f5e6ae3907..5e4e927647 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -675,7 +675,8 @@ $ git rebase -i HEAD~5
 
 And move the first patch to the end of the list.
 
-You might want to preserve merges, if you have a history like this:
+You might want to recreate merge commits, e.g. if you have a history
+like this:
 
 ------------------
            X
@@ -689,7 +690,7 @@ Suppose you want to rebase the side branch starting at "A" to "Q". Make
 sure that the current HEAD is "B", and call
 
 -----------------------------
-$ git rebase -i -p --onto Q O
+$ git rebase -i -r --onto Q O
 -----------------------------
 
 Reordering and editing commits usually creates untested intermediate
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadget
Message 4 of 4 in “Deprecate git rebase -p even more”
  1. 0/3 Deprecate git rebase -p even moreJohannes Schindelin via GitGitGadget, May 28, 2019
  2. 1/3 tests: mark a couple more test cases as requiring `rebase -p`Johannes Schindelin via GitGitGadget, May 28, 2019
  3. 2/3 docs: say that `--rebase=preserve` is deprecatedJohannes Schindelin via GitGitGadget, May 28, 2019
  4. 3/3 rebase docs: recommend `-r` over `-p`Johannes Schindelin via GitGitGadget, May 28, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.