git:No remote repository specified 解决方法

git pull代码时候出现,或者push代码无效

fatal: No remote repository specified.  Please, specify either a URL or a

remote name from which new revisions should be fetched.

解决找到本地仓库项目里面的 .git文件夹,找到

config打开,修改里面内容

git pull代码时候出现,或者push代码无效

fatal: No remote repository specified.  Please, specify either a URL or a

remote name from which new revisions should be fetched.

解决找到本地仓库项目里面的 .git文件夹,找到

config打开,修改里面内容为:

[core]
symlinks = false
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[remote "origin"]
url = https://gitee.com/xxx/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = https://gitee.com/xxx/xxx.git
[branch "master"]
remote = origin
merge = refs/heads/master

把其中换成你项目的地址就可以了:

url = https://gitee.com/xxx/xxx.git

pushurl = https://gitee.com/xxx/xxx.git

把其中换成你项目的地址就可以了.

猜你喜欢

转载自blog.csdn.net/angellee1988/article/details/82712150