idea 上传项目到gitlab(git)

打印 上一主题 下一主题

主题 531|帖子 531|积分 1593

一、在gitlab上新建项目

可以不创建README.md文件,省得推送项目时报错,
git 推送报错解决办法

二、idea推送项目到gitlab

1、idea的git设置


2、编辑gitignore文件,把排除的加上


3、VCS-创建Git堆栈


4、选择项目


5、这样就有Git菜单了


6、Git-添加


7、提交


8、仍然提交


9、Git-推送


10、界说远程


11、把Git地点填上


12、推送


13、推送被拒


14、在控制台中显示具体信息


15、报错文本

  1. 16:04:07.007: [tlzf] git -c ... push --progress --porcelain origin refs/heads/master:refs/heads/master --set-upstream
  2. error: failed to push some refs to 'http://10.10.10.10/cesp/tlzf.git'
  3. hint: Updates were rejected because the remote contains work that you do
  4. To http://10.10.10.10/cesp/tlzf.git
  5. !    refs/heads/master:refs/heads/master    [rejected] (fetch first)
  6. hint: not have locally. This is usually caused by another repository pushing
  7. Done
  8. hint: to the same ref. You may want to first integrate the remote changes
  9. hint: (e.g., 'git pull ...') before pushing again.
  10. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
复制代码
16、git推送报错解决办法

git 推送报错解决办法
先拉一下,答应不干系的汗青记录
git pull origin master --allow-unrelated-histories
可以直接在idea的终端里敲下令

idea的终端可以切换到Git Bash

17、再次推送


18、推送乐成


三、idea项目关闭版本控制,断开git连接

idea项目关闭版本控制,断开git连接
 
四、参考

idea上传本地项目到gitlab


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

王海鱼

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表