git pull命令更新本地專案的時候遇到“No remote repository specified……”的錯誤
阿新 • • 發佈:2019-02-15
有些使用者在使用git pull命令更新本地專案的時候會遇到“No remote repository specified……”的錯誤,那麼要如何解決呢?
git pull
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
其實出問題的原因是.git/config的配置出問題了。
解決方法:
修改“.git”資料夾裡面的“config”檔案的url就可以了:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = false [remote "origin"] url = https://github.com/checkfrank/checkfrank.github.io.git fetch = +refs/heads/*:refs/remotes/origin/* pushurl = https://github.com/checkfrank/checkfrank.github.io.git [branch "master"] remote = origin merge = refs/heads/master
把其中換成你專案的地址就可以了:
url = https://github.com/CrossLee/xxx.git
pushurl = https://github.com/CrossLee/xxx.git