admin管理员组文章数量:1635839
一、使用git命令将项目下载到本地
git init
git push https://github.com/Gaojunlong/3y.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:git remote用法
# 查看关联的远程仓库的名称
git remote
# 查看关联的远程仓库的详细信息
git remote -v
# git_url 为你的远程仓库的 url,可采用 http 协议或 ssh(git) 协议
git remote add origin <url>
# 删除关联的远程仓库
git remote remove <name>
# 添加新的远程仓库关联
git remote add <name> <url>
二、第一次使用push的时候需要进行配置
第一次push时需要网址
git add --all 或者使用 git add .(所得的文件) | git add file.js(对用指定文件)
git commit -m "提交信息"
git remote add origin '远程仓库url'
git push -u origin origin(对应远程分支名)
在下次使用的时候,直接输入以下命令即可
git add --all | git add .(所得的文件) | git add file.js(对用指定文件)
git commit -m "信息"
git push
%%%%%%%%以上为git的踩坑总结%%%%%%%%%%
本文标签: FATALGitconfigureddestinationpush
版权声明:本文标题:git ------ fatal: No configured push destination. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1729214832a1190302.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论