'origin' does not appear to be a git repository
时间: 2023-11-21 08:40:59 浏览: 81
BSV节点升级后,打开钱包错误!We do not appear to fully agree with our peers
当你执行"git push origin master"时出现错误:"fatal: 'origin' does not appear to be a git repository"。这个错误通常发生是因为你的.git/config文件中缺少了[remote "origin"]和[branch "master"]节点的信息。
解决方法是在.git/config文件中添加以下信息:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = http://192.168.1.183/git/RCTools.git
fetch = refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
这样,git在执行"git push origin master"时就能正确找到所需的分支信息,避免出现错误提示。
阅读全文