fatal: Unable to read current working directory: No such file or directory

后端 未结 2 870
名媛妹妹
名媛妹妹 2021-02-18 13:23

I\'m a Windows 10 user, using gitbash as a command prompt.

After I changed the branch to master, suddenly I\'m struck with this error message.



        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 13:40

    I got this message when trying to execute git commands in crosh on a chromebook. The local files were on a removable drive (an SDXC card in this case). I fixed it by changing directory up and back into the repo's main directory:

    $ cd ..

    $ cd (my repo's directory)

    And presto, git was working again. I've used this set up a lot, I have no idea what happened, other than maybe Chrome OS got confused and didn't know what was going on. But

    $ pwd

    worked fine before I fixed the issue, while the error was happening.

提交回复
热议问题