我在我的仓库上做了一个git pull,自从我做了之后,我用 git 做的任何事情都会遇到错误。我通常得到的错误是:
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Run Code Online (Sandbox Code Playgroud)
知道是什么原因造成的吗?
您正在调用git pull的不是 git 存储库。
首先将存储库初始化为:
git init
Run Code Online (Sandbox Code Playgroud)
然后将您的存储库来源添加为:
git remote add origin <url of repo>
Run Code Online (Sandbox Code Playgroud)
然后调用git pull或推送您的代码。