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

Re: Pitfalls in auto-fast-forwarding heads that are not checked out?

From
John Szakmeister <john@szakmeister.net>
Date
May 4, 2013, 13:17 UTC
Message-ID
<CAEBDL5W6J60KhAjnWyCkMbR_tu2kftqp_w0rc0RsUr2-rDNgUQ@mail.gmail.com>
In-Reply-To
<CACPiFCK=8KFX++Bg+LhymorSMnWgrj5Js+-f=UYyZnNY=n9WiA@mail.gmail.com>

On Sat, May 4, 2013 at 7:35 AM, Martin Langhoff <martin.langhoff@gmail.com> wrote: [snip]

Show 9 quoted lines
> When I do git pull, git is careful to only update the branch I have
> checked out (if appropriate). It leaves any other branches that track
> branches on the remote that has just been fetched untouched. I always
> thought that at some point git pull would learn to evaluate those
> branches and auto-merge them if the merge is a ff.
>
> I would find that a natural bit of automation in git pull. Of course
> it would mean a change of semantics, existing scripts could be
> affected.
I agree.  I've been using this script for quite a while now:
<https://github.com/jszakmeister/etc/blob/master/git-addons/git-ffwd>

I've been pretty happy with it. It's not of my own design, I picked up from StackOverflow:

<http://stackoverflow.com/a/9076361/683080>

And made a couple of minor tweaks to cope with my configuration (I have merge setup to not fast-forward merge by default).

-John
Previous: Martin LanghoffNext: Jonathan Nieder
Message 4 of 6 in “Pitfalls in auto-fast-forwarding heads that are not checked out?”
  1. Martin LanghoffMay 3, 2013
  2. Johannes SixtMay 4, 2013
  3. Martin LanghoffMay 4, 2013
  4. John SzakmeisterMay 4, 2013
  5. Jonathan NiederMay 4, 2013
  6. Martin LanghoffMay 7, 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.