git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: new to git

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 27, 2007, 20:39 UTC
Message-ID
<7vabsczp94.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<46D33290.20405@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 10 quoted lines
> git pull = git fetch + git merge. The notation you use above is obsoleted
> and no longer works in git 1.5.3. Instead you'd have to replace
>
> 	git pull . foo
>
> with
>
> 	git merge foo
>
> which will most likely clear up some confusion.

Huh? "git pull . foo" has always been the same as "git merge foo", I thought... Have we broken anything?

Show 8 quoted lines
>> (2) Any way to disable this warning:
>>
>> Warning: No merge candidate found because value of config option
>>          "branch.local.merge" does not match any remote branch fetched.
>>
>
> Yes. Edit your .git/config file to add a merge candidate for your local
> branch.

Or, say what branch you get from the remote you want to merge explicitly. You may not always merge the same branch from the remote. E.g.

	$ git pull origin experimental
	$ git pull origin master
Show 18 quoted lines
>> (4) I'm still not clear on when a dst should and should not be used in a
>> refspec.  It appears that one can only do non-fast forward updates to
>> the branch that is checked out (which makes sense, since you may need to
>> resolve), but other than that, what is the difference between
>>
>> git checkout foo
>> git pull . master
>>
>> and
>>
>> git checkout master
>> git push . master:foo
>>
>> ?
>>
>
> Here I'm clueless, except that this matches old syntax which is no longer
> valid.
Huh again about "no longer valid" part.

In any case, the former says "I am on foo branch, and I want to merge 'master' from _MY_ local repository". The latter says "I want to update the local branch 'foo' with what is in my 'master' branch, both local". They are totally different.

Please do _not_ spread backward incompatibility FUD.
Previous: Kyle RoseNext: Andreas Ericsson
Message 5 of 8 in “new to git”
  1. Kyle RoseAug 27, 2007
  2. J. Bruce FieldsAug 27, 2007
  3. Andreas EricssonAug 27, 2007
  4. Kyle RoseAug 27, 2007
  5. Junio C HamanoAug 27, 2007
  6. Andreas EricssonAug 27, 2007
  7. Jan HudecSep 5, 2007
  8. Junio C HamanoSep 5, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.