git提交的BUG修改汇总
git提交的BUG修改汇总在进行如下的代码提交后git add .git commit -m '提交'在进行如下的命令git push会出现如下的错误$ git pushfatal: No configured push destination.Either specify the URL from the command-line or configure a remote repository
·
git提交的BUG修改汇总
在进行如下的代码提交后
git add .
git commit -m '提交'
在进行如下的命令
git push
会出现如下的错误
$ git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
解决办法
(其实上面已经给出写的报错原因已经给了)
增加如下代码
$ git remote add origin '你自己要上传的远程地址'
例:
$ git remote add origin https://gitee.com/AristoVBY/kuang-shen.git
然后再点击运行如下代码
git push origin master
发现会报如下的错误
解决办法
--运行下面代码(拉取文件)
$ git pull --rebase origin master
再次点击push
git push origin master
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-JVC5Fb9M-1640329887246)(https://s2.loli.net/2021/12/24/Mfq8DG9TaRObcdV.png)]
然后进入自己的repository中进行查看提交状态(提交后的状态)
结果:
更多推荐
已为社区贡献2条内容
所有评论(0)