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

[RFC] allow git pull to preserve merges

From
Stephen Haberman <stephen@exigencecorp.com>
Date
Aug 8, 2013, 17:38 UTC
Message-ID
<1375983492-32282-1-git-send-email-stephen@exigencecorp.com>
Hey,
Following up on an old thread (2008):
http://git.661346.n2.nabble.com/pull-preserve-merges-td1471688.html

I'd like to finally add a config parameter/setting to allow git pull to preserve merges when it's rebasing. This addresses a somewhat common boundary case of a locally merged feature branch getting flattened into master, as described here:

http://notes.envato.com/developers/rebasing-merge-commits-in-git/

This current patch adds a new `pull.preserve-merges` boolean config setting, but we could also change the existing `pull.rebase` to be tri-state (so `pull.rebase` can be true, false, or preserve-merges), or add a more generic `pull.rebaseoptions` that is just a string of flags to pass to rebase.

Any of these would be fine with me--what would be preferred?

This patch doesn't update the docs, but I wanted to get an initial sanity check on the preferred config setting before doing that.

Thanks!
- Stephen
Stephen Haberman (1):
  pull: Allow pull to preserve merges when rebasing.
 git-pull.sh     | 11 +++++++++--
 t/t5520-pull.sh | 15 +++++++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)
-- 
1.8.1.2
Next: Stephen Haberman
Message 1 of 9 in “[RFC] allow git pull to preserve merges”
  1. Stephen HabermanAug 8, 2013
  2. pull: Allow pull to preserve merges when rebasing.Stephen Haberman, Aug 8, 2013
  3. Stephen HabermanAug 8, 2013
  4. Johannes SchindelinAug 8, 2013
  5. Stephen HabermanAug 8, 2013
  6. Philip OakleyAug 8, 2013
  7. Junio C HamanoAug 8, 2013
  8. Johannes SchindelinAug 9, 2013
  9. Stephen HabermanAug 9, 2013

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.