{"thread":{"id":"15904","subject":"from symlinked directory: unable to chdir or not a git archive","startedAt":"2008-10-14T22:58:13Z","lastAt":"2008-10-14T22:58:13Z","messageCount":1,"participants":["Marcel M. Cary"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93042","messageId":"48F52405.6010406@earth.care2.com","threadId":"15904","inReplyTo":null,"subject":"from symlinked directory: unable to chdir or not a git archive","fromName":"Marcel M. Cary","fromEmail":"marcel@earth.care2.com","sentAt":"2008-10-14T22:58:13Z","receivedAt":"2008-10-14T22:58:13Z","isPatch":false,"sender":{"key":"marcel@earth.care2.com","avatar":null},"body":"I'm getting an error:\n\n  fatal: 'origin': unable to chdir or not a git archive\n\nwhen trying to pull even though pushing works just fine.  So I don't\nthink the problem is that the remote repository doesn't exist.  (I see\nthe entry in GitFaq for this error message, but I don't think that\nanswer quite explains this situation.)\n\nI think it's important that, when pulling, I'm in a directory that is a\nsymlink into the Git working copy.  Having git operate correctly in that\nenvironment is important to me because Git doesn't support checking out\na subdirectory of my project.\n\nA shell transcript follows that illustrates a simplified problem\nscenario using Git 1.6.0.1.  I see the same error message with 1.6.0.2\nand 1.6.0.2.530.g67faa (master branch today).\n\nIs there an easy way around this?  Right now I have to cd to the target\nof the symlink to do the pull, which is annoying.\n\nThanks,\nMarcel\n\n~/git$ mkdir tmp-repo\n~/git$ cd tmp-repo/\n~/git/tmp-repo$ git init\nInitialized empty Git repository in /home/marcel/git/tmp-repo/.git/\n~/git/tmp-repo$ mkdir foo\n~/git/tmp-repo$ touch foo/bar\n~/git/tmp-repo$ git add foo/bar\n~/git/tmp-repo$ git commit -m 'Add empty file'\nCreated initial commit 651b80a: Add empty file\n 0 files changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 foo/bar\n~/git/tmp-repo$ cd ..\n~/git$ git clone tmp-repo clone-repo\nInitialized empty Git repository in /home/marcel/git/clone-repo/.git/\n~/git$ ln -s clone-repo/foo/ foo-link\n~/git$ cd foo-link/\n~/git/foo-link$ echo hello >> bar\n~/git/foo-link$ git commit -a -m 'Say hi'\nCreated commit 0a92c49: Say hi\n 1 files changed, 1 insertions(+), 0 deletions(-)\n~/git/foo-link$ git push origin master\nCounting objects: 7, done.\nWriting objects: 100% (4/4), 281 bytes, done.\nTotal 4 (delta 0), reused 0 (delta 0)\nUnpacking objects: 100% (4/4), done.\nTo /home/marcel/git/tmp-repo/.git\n   651b80a..0a92c49  master -> master\n~/git/foo-link$ git pull\nfatal: 'origin': unable to chdir or not a git archive\nfatal: The remote end hung up unexpectedly\n~/git/foo-link$ cd ~/git/clone-repo/foo\n~/git/clone-repo/foo$ git pull\nAlready up-to-date.\n~/git/clone-repo/foo$\n\non Linux 2.6.18-4-486, ext3\n"}]}