Summary:
When creating a linked working directory with `git checkout --to`, you
cannot clone from the local path. This works when cloning the main
repository directory.

I couldn't find anything the the documentation for `git checkout` that
indicates that this shouldn't work.

Repro:
Creating a repo `foo`, checkout --to'ing it to ../bar, then try to
clone both resulting repositories -

$ git --version
git version 2.4.4.600.g6397abd
$ mkdir foo
$ cd foo
$ git init
Initialized empty Git repository in /bar/foo/.git/
$ git commit -m init --allow-empty
[master (root-commit) c6da399] init
$ git branch bar
$ git checkout bar --to ../bar
Enter ../bar (identifier bar)
Switched to branch 'bar'
$ cd ../bar
$ cd bar
$ git status -sb
## bar
$ cd ..
$ git clone bar baz
Cloning into 'baz'...
fatal: '/path/bar' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ git clone foo baz
Cloning into 'baz'...
done.


-- 
bjor...@snoksrud.no
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to