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

Question: git clone --no-checkout behavior

From
Bryan Turner <bturner@atlassian.com>
Date
Jul 12, 2012, 12:51 UTC
Message-ID
<CAGyf7-EZOSiATo3yF5x+FT6_QAkMTJ+AmrE27kwmxLkLXdaJKg@mail.gmail.com>
I've witnessed the following behavior in both git 1.7.6 and 1.7.10.4.
Assume I have a bare clone, some-repo.git. If I run:
- git clone --shared --no-checkout /path/to/some-repo.git shared-repo
- cd shared-repo
- git status

I see that every file in the repository is _staged_ for deletion. I'm not surprised every file shows deleted; I'm surprised that the deletion starts out already staged. A git reset unstages all of the deletions and I'm good to go. I'm just wondering why they're all staged in the first place; it seems counter-intuitive.

Can anyone shed some light on this? Bryan Turner

Next: Junio C Hamano
Message 1 of 3 in “Question: git clone --no-checkout behavior”
  1. Bryan TurnerJul 12, 2012
  2. Junio C HamanoJul 12, 2012
  3. Junio C HamanoJul 12, 2012

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.