Re: [PATCH] Documentation: update git-pull.txt for clone's new default behavior
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:47
Luben Tuikov [off-list ref] writes:
quoted hunk
--- "J. Bruce Fields" <bfields@fieldses.org> wrote:...quoted
-The common `Pull: master:origin` mapping of a remote `master` -branch to a local `origin` branch, which is then merged to a -local development branch, again typically named `master`, is made -when you run `git clone` for you to follow this pattern.So is this no longer the case? Can someone please bring me up to date? What is going on?
What's going on is clean-up towards v1.5.0-rc1 ;-).
- 'git clone' does not create a file that has a line that looks
like "Pull: master:origin" anywhere anymore.
- 'git clone' also does not create the traditional "'master' is
special and we map that to origin, others are mapped as is
under refs/heads/, and we have to drop 'origin' from the
remote side because that name we want to use to store their
'master'" layout.
So after a clone, you would get:
[remote "origin"]
url = ....
fetch = refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
This configuration still causes "git pull" or "git pull origin"
while on "master" to fetch and store the remote side's master as
what you can refer to as 'origin' (because it expands to
'remotes/origin/HEAD' thanks to sha1_name.c::get_sha1_basic()),
and then merges that to your current branch, so there is no
change in the user experience in the big picture, but what is
created to achieve that effect is different from what was
described.