Git 提示 No remote repository specified. Please, specify either a URL or a remote name from which new revisi ...
解决方案:
1.进入项目路径,打开 gitconfig 配置文件
$ git config -e
2.将里面的 url 和 pushurl 换成你项目的地址就可以了
url = https://github.com/ZhaoXiaolu/xxx.git
pushurl = https://github.com/ZhaoXiaolu/xxx.git
也可以将下面的代码复制进去更改url即可
- [core]
- repositoryformatversion = 0
- filemode = true
- bare = false
- logallrefupdates = true
- ignorecase = true
- precomposeunicode = false
- [remote "origin"]
- url = https://github.com/CrossLee/xxx.git
- fetch = +refs/heads/*:refs/remotes/origin/*
- pushurl = https://github.com/CrossLee/xxx.git
- [branch "master"]
- remote = origin
- merge = refs/heads/master