Re: [PATCH] Explicitly add the default "git pull" behaviour to .git/config on clone
- From
- Josef Weidendorfer <josef.weidendorfer@gmx.de>
- Date
- Dec 6, 2006, 17:00 UTC
- Message-ID
- <200612061800.17087.Josef.Weidendorfer@gmx.de>
- In-Reply-To
- <200612061207.23437.andyparkins@gmail.com>
On Wednesday 06 December 2006 13:07, Andy Parkins wrote:
> The [branch "master"] section is such that there is no change to the > functionality of git-pull, but that functionality is now explicitly > documented.
Nice. However, changing "git-clone" for this is an adhoc solution and looks wrong.
Branching off a local development branch for a tracking branch is the job of git-branch. So first, git-branch should be called from git-clone to do this setup.
And git-branch should be told to change the configuration of default behavior of git-pull, whenever it sees that you are branching off from a branch tracking a remote one. I even would go so far to setup a default "git-pull" action even for branching off from local branches, by setting "branch.<newbranch>.remote = ." to merge from local "upstream".
Similar, "git-checkout -b <newbranch>" should call "git-branch" for branch creation, too.