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

Failure cloning from a separate-git-dir repository

From
RTRichard Tibbitt <gitlist@lazyprune.com>
Date
Aug 20, 2011, 17:47 UTC
Message-ID
<6csv47te4qv41ni53q0kf1fne0a4e1grnm@4ax.com>
Hi
I've been struggling to find an answer to this for days.

Can anyone confirm whether I've got the syntax right for 'Git clone' when attempting to clone FROM a repository that was initialized using --separate-git-dir ?

If so, does this work on Linux systems ?

With Git on windows (git version 1.7.6.msysgit.0 installed from GitExtensions224SetupComplete.msi) I get an error as below, that looks as though 'Git clone' is expecting the repo to have a 'normal' integral .git dir

  F:\>mkdir repo2
  F:\>mkdir repo2git
  F:\>cd repo2
  F:\repo2>call git init --separate-git-dir="..\repo2git\.git"
  Initialized empty Git repository in F:/repo2git/.git/
  F:\repo2>echo abc >file1.txt
  F:\repo2>call git add . -A
  F:\repo2>call git commit -m "first"
  [master (root-commit) c7e4766] first
   1 files changed, 1 insertions(+), 0 deletions(-)
   create mode 100644 file1.txt
  F:\repo2>cd ..
  F:\>call git clone repo2 clone2
  Cloning into clone2...
  fatal: failed to open 'F:/repo2/objects': No such file or directory
Many thanks in advance for any insight into this.
Richard
Next: Nguyen Thai Ngoc Duy
Message 1 of 6 in “Failure cloning from a separate-git-dir repository”
  1. Richard TibbittAug 20, 2011
  2. Nguyen Thai Ngoc DuyAug 20, 2011
  3. Richard TibbittAug 20, 2011
  4. Nguyen Thai Ngoc DuyAug 21, 2011
  5. Richard TibbittAug 21, 2011
  6. Junio C HamanoAug 21, 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.