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

local git clone problem

From
NYNikita V. Youshchenko <yoush@cs.msu.su>
Date
Jul 30, 2007, 08:42 UTC
Message-ID
<200707301242.54669@sercond.localdomain>
Hello.
I'm trying to clone a local git repository and it fails:

nikita@blacky:~/linux-2.6> git clone -l -s -n . ../new Initialized empty Git repository in /home/nikita/new/.git/ /usr/bin/git-clone: line 381: cd: /home/nikita/new/.git/refs/remotes/origin: No such file or directory

The command is [almost] from git-clone(1) examples.
Examining .git in the new directory after the error:

nikita@blacky:~/new> ls -aR .: ./ ../ .git/

./.git: ./ ../ branches/ config description HEAD hooks/ info/ objects/ refs/

./.git/branches: ./ ../

./.git/hooks: ./ applypatch-msg post-commit post-update pre-commit update ../ commit-msg post-receive pre-applypatch pre-rebase

./.git/info: ./ ../ exclude

./.git/objects: ./ ../ info/ pack/

./.git/objects/info: ./ ../ alternates

./.git/objects/pack: ./ ../

./.git/refs: ./ ../ heads/ tags/

./.git/refs/heads: ./ ../

./.git/refs/tags: ... (same as in .git/refs/tags/ of the original directory)

Looks like for some reason, .git/refs/remotes in the new directory is not created, but referenced.

Original repository was created by 'git init' and then populated with several 'git remote add' and 'git remote update' commands.

This is with debian package git-core 1:1.5.2.1-1~bpo.1 (current debian etch-backports version)

Is this a bug? If not, what I'm doing wrong? Is it possible to manually 'fix' the original directory such that local clones from it will become possible?

Nikita
Message 1 of 1 in “local git clone problem”
  1. Nikita V. YoushchenkoJul 30, 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.