Re: "git pull . <branch>" versus "git merge <branch>"
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Jun 11, 2008, 02:04 UTC
- Message-ID
- <484F32B1.4050506@gnu.org>
- In-Reply-To
- <20080611015608.GD29404@genesis.frugalware.org>
Miklos Vajna wrote:
Show 7 quoted lines
> On Wed, Jun 11, 2008 at 03:13:45AM +0200, Rene Herman <rene.herman@keyaccess.nl> wrote: >> So in the case of merging a branch from the local repository into the >> current branch, there is no difference between the two? > > There is no difference, but you really want to use git merge and not git > pull in such a case, I guess the git pull form is supported mainly to > keep backwards compatibility.
However, when you're on a tracking merge only "git pull" will merge the right branch automatically into the current branch, fetching the branch name to merge from the config. If the branch.*.remote config key is ".", it will do a local merge.
Note that "git pull ." is optimized in that the fetch does nothing except setting up MERGE_HEAD.
Paolo