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

Re: Cloning into an existing directory

From
Andrew Ruder <andy@aeruder.net>
Date
Feb 16, 2009, 16:48 UTC
Message-ID
<a030d93b0902160848x1c0521c3jb5ed2f1bf865a097@mail.gmail.com>
In-Reply-To
<e38bce640902160813u2771d55co3eb583a0922c09c5@mail.gmail.com>
On Mon, Feb 16, 2009 at 9:13 AM, Brent Goodrick <bgoodr@gmail.com> wrote:
> 1. Move aside each file it complains about
> 2. Run the git-checkout command again
> 3. Move each file back to their original names, thus creating a local
> edit w.r.t. git

Actually, on my git (1.6.0.4) this just magically works due to the fact that 'git init' sets up the repository with HEAD pointing to refs/heads/master (which doesn't exist yet) and you go ahead and create the master branch with the 'git branch' command.

In other words, in this particular situation the 'git checkout' command is completely unnecessary and if you just run a 'git status' you should already see that git sees all the differences already as local edits (assuming you didn't call you branch in the 'git branch' step something other than master).

-- 
Andrew Ruder <andy@aeruder.net>
http://www.aeruder.net
Previous: Brent GoodrickNext: Brent Goodrick
Message 4 of 5 in “Cloning into an existing directory”
  1. Brent GoodrickFeb 16, 2009
  2. Russell SteickeFeb 16, 2009
  3. Brent GoodrickFeb 16, 2009
  4. Andrew RuderFeb 16, 2009
  5. Brent GoodrickFeb 17, 2009

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.