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

Re: Cloning into an existing, non-empty directory?

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 25, 2011, 08:00 UTC
Message-ID
<20110425075750.GA28172@elie>
In-Reply-To
<BANLkTinV4cFC5vzr25V-D3PMwWx284zgoQ@mail.gmail.com>
Hi,
Richard Hartmann wrote:
> I think I reduced the test-case as much as I can
All right, sorry to be so dense.  I tried:
	git init test && cd test
	git remote add origin ~/src/some-repo
	git fetch origin
and then:
	$ git merge origin
	fatal: origin - not something we can merge

Is this what you mean? "git merge" is not advertised as taking the name of a remote repository as a parameter. The usual usage is instead to pass a commit, as in "git merge origin/master".

I'm not sure what a good meaning for "git merge <repository>" would be. "git pull <repository>" does "git fetch <repository>" and then, if one of the fetched branches from <repository> is the configured upstream for the current branch, merges it.

Ideas? Probably the documentation or error message could use help from someone less blind to see what a first-time reader would see.

Regards, Jonathan

Previous: Richard HartmannNext: Andreas Schwab
Message 8 of 12 in “Cloning into an existing, non-empty directory?”
  1. Richard HartmannApr 21, 2011
  2. Jonathan NiederApr 21, 2011
  3. Richard HartmannApr 22, 2011
  4. Jonathan NiederApr 23, 2011
  5. Nguyen Thai Ngoc DuyApr 23, 2011
  6. Jonathan NiederApr 23, 2011
  7. Richard HartmannApr 23, 2011
  8. Jonathan NiederApr 25, 2011
  9. Andreas SchwabApr 25, 2011
  10. Jonathan NiederApr 25, 2011
  11. Jeff KingApr 25, 2011
  12. Richard HartmannApr 25, 2011

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.