[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A simple git workflow for the rest of us

From: David Engster
Subject: Re: A simple git workflow for the rest of us
Date: Sun, 16 Nov 2014 15:34:11 +0100
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.91 (gnu/linux)

Lars Magne Ingebrigtsen writes:
> And now the push.  I see that I was mistaken last time -- it did
> actually push my trunk change, but it's complaining about the emacs-24
> branch, where I have no changes and that I didn't want to push.

That's the (horrible) default behavior of 'git push': it tries to update
all matching branches. This makes it incredibly easy to update branches
by accident, which in your case didn't work because your emacs-24 branch
was behind.

I strongly suggest to change the default to something like 'simple',
which will only update the current branch to the corresponding upstream
branch with the same name. This was also made the new default in Git
2.x (way too late, but at least they changed it).

You can set this globally by doing

  git config --global push.default simple

Note that 'simple' is only available since Git 1.7.11, and Debian stable
still has 1.7.10. On older versions you can use 'upstream' or maybe
'current' (see 'git help config' to see the available options for
'push.default'), but I'd rather suggest to update Git from


reply via email to

[Prev in Thread] Current Thread [Next in Thread]