I have a normal repo where there is a working tree and a .git folder in the same directory as the working tree.
I'm trying to run a git command from outside this location with the command
git --git-dir=/path/to/repo/.git --work-tree=/path/to/repo pull /some/other/repo master
but I keep getting the error fatal: /usr/libexec/git-core/git-pull cannot be used without a working tree.
.
What am I doing wrong?
This is a bug in earlier versions of Git. This problem should go away once you upgrade to 1.7.7.2 or later.
From the commit that fixed the bug:
See also commit e2eb527.