Description
The git configuration branch.autoSetupMerge = always causes incorrect upstream tracking when creating branches from local branches.
Current Behavior
In dot_gitconfig.tmpl:71:
[branch]
autoSetupMerge = always
When you create a new branch from a local branch:
git checkout -b feature-b feature-a
The upstream is set to the local branch feature-a instead of a remote branch.
Problem
This conflicts with push.autoSetupRemote = true workflow and causes confusion about where branches should push.
Proposed Fix
Change to:
[branch]
autoSetupMerge = simple
With simple, upstream is only set when the start point is a remote-tracking branch (e.g., origin/main), which keeps the push.autoSetupRemote=true workflow intact.
References
Description
The git configuration
branch.autoSetupMerge = alwayscauses incorrect upstream tracking when creating branches from local branches.Current Behavior
In
dot_gitconfig.tmpl:71:When you create a new branch from a local branch:
The upstream is set to the local branch
feature-ainstead of a remote branch.Problem
This conflicts with
push.autoSetupRemote = trueworkflow and causes confusion about where branches should push.Proposed Fix
Change to:
With
simple, upstream is only set when the start point is a remote-tracking branch (e.g.,origin/main), which keeps thepush.autoSetupRemote=trueworkflow intact.References
dot_gitconfig.tmpl:71