Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: [PATCH 2/3] DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"

From: Björn Steinbrink <hidden>
Date: 2016-06-15 22:47:34

Possibly related (same subject, not in this thread)

On 2009.10.19 05:20:43 +0900, Nanako Shiraishi wrote:
A user who always wants tracking can set the config option and use 
the new "git checkout frotz" shortcut, but a user who usually 
doesn't want tracking doesn't have the config option and when he 
wants tracking only for this new branch he can explicitly say "git 
checkout -t origin/frotz", right?
Well, branch.autosetupmerge has three possible values.
 - true: Do the upstream setup when starting from remote tracking
   branches
 - always: Also do the upstream setup when starting from a local branch
   head
 - false: Don't do any upstream setup

The default is "true", which should catch the "git checkout frotz"
shortcut, as that selects a remote tracking branch as the starting
point. So the user doesn't have to change any config setting to have
that act as if -t was given.

Only if we doesn't want "git checkout frotz" to not do the upstream
setup, he needs to set branch.autosetupmerge to false.

And falling back to "git checkout --track/--no-track origin/frotz" he
can override whatever config setting he has.

Björn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help