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