首页 > 其他 > 详细

idea为本地项目创建仓库并git到云上

时间:2018-09-26 13:49:42      阅读:427      评论:0      收藏:0      [点我收藏+]

1、为本地项目创建一个本地仓库:

技术分享图片

2、在码云上创建一个仓库,(初始化的时候先不要创建README.md文件)

3、本地仓库关联远程仓库:右键项目选址git>>repository>>remotes

技术分享图片

点+号输入远程仓库的地址

技术分享图片

 

4、add、commit、pull、push将本地项目存储到远程仓库

 

如果报错:refusing to merge unrelated histories

则:git pull origin master --allow-unrelated-histories

 如果>>git push 提示fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

则执行:git push --set-upstream origin master

或者:git push -u origin master  (说是如果没有分支会创建分支,未验证)

技术分享图片

idea创建git项目到远程仓库:https://jingyan.baidu.com/article/0a52e3f4ef625bbf62ed7286.html

IDEA中如何初始化git本地仓库,并提交到远程仓库

 

idea为本地项目创建仓库并git到云上

原文:https://www.cnblogs.com/jeryM/p/9706408.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!