idea 上传项目到gitlab(git)

[复制链接]
发表于 2024-8-15 18:41:15 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
一、在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企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表