-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use git when cwd is nonexistent directory #472
Comments
Checked out an old commit of which repository? What is the output of |
Ping! Need more info on this |
Closing due to lack of info |
I'm getting the same error now, even for the most basic commands:
Here's what I know about how to reproduce it:
If I
Here's a reduced test case to trigger it, although I'm not sure how similar it is to case I ran into: mkdir git-test
cd git-test/ Now in another terminal window, rm -rf the $ hub --version
/usr/local/bin/hub:1305:in `pwd': No such file or directory - getcwd (Errno::ENOENT)
from /usr/local/bin/hub:1305:in `<module:Context>'
from /usr/local/bin/hub:834:in `<module:Hub>'
from /usr/local/bin/hub:833:in `<main>' Boom goes the dynamite. It could be that people get into this situation in more normal usage scenarios perhaps because |
Oh, so you end up in a directory which doesn't exist (gets deleted through git checkout). I get it now. Nasty problem—I'll see what can be done. |
Here's the more interesting case than a purely missing directory: This corresponds to a changed-inode case, which I think I ran into as part of a rebase workflow:
|
I looked at other ways to get the equivalent of
|
😄 |
This worked for me:
|
I'm now getting
for whatever I try to do with Git.
The text was updated successfully, but these errors were encountered: