Confusing error message from "git pull" when upstream repo no longer exists
When running "git pull", I get this error message:
fatal: /usr/local/libexec/git-core/git-pull cannot be used without a
working tree.
"git fetch" gives me a much clearer error message:
fatal: '/var/git/project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
/var/git/project.git does no longer exist on the origin server, so I understand why the commands fail. I think "git pull" should have a less confusing error message, though.
/ceder
Signature · 1 line
Per Cederqvist, [email protected]
Quoted 4 lines · Per Cederqvist
When running "git pull", I get this error message:
fatal:
/usr/local/libexec/git-core/git-pullcannot be used without a working tree.
This error message is shown when you try to pull in a bare repository (without a working tree). It seems you don't have a working tree, but you have a repository, so you can still fetch. (the working tree check is done before the fetch).
HTH,
Santi
Quoted 7 lines · Santi Béjar
Quoted 4 lines · Per Cederqvist
When running "git pull", I get this error message:
fatal:
/usr/local/libexec/git-core/git-pullcannot be used without a
working tree.
Quoted 7 lines
This error message is shown when you try to pull in a bare repository (without a working tree). It seems you don't have a working tree, but you have a repository, so you can still fetch. (the working tree check is done before the fetch).
HTH,
Santi
Oh. You are correct. I was in a bare repository, so I guess the message is good after all. Sorry for my mistaken report.
/ceder
Signature · 1 line
Per Cederqvist, [email protected]