报错如下:
$ 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>
原因:
第一次push
解决:
$ git add .
$ git commit -m "更新日志"
$ git remote add origin '仓库url'
$ git push -u origin 对应远程分支名
后面就可以直接push:
$ git add .
$ git commit -m "更新日志"
$ git push
在尝试使用$gitpush时遇到fatal:Noconfiguredpushdestination错误,这是由于没有设置远程仓库。解决方法包括:使用$gitadd.和$gitcommit-m添加和提交更改,然后用$gitremoteaddorigin仓库url配置远程仓库,最后使用$gitpush-uorigin对应远程分支名进行推送。之后,可以直接用$gitadd.,$gitcommit-m和$gitpush进行常规操作。
4907

被折叠的 条评论
为什么被折叠?



