一、在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、报错文本
- 16:04:07.007: [tlzf] git -c ... push --progress --porcelain origin refs/heads/master:refs/heads/master --set-upstream
- error: failed to push some refs to 'http://10.10.10.10/cesp/tlzf.git'
- hint: Updates were rejected because the remote contains work that you do
- To http://10.10.10.10/cesp/tlzf.git
- ! refs/heads/master:refs/heads/master [rejected] (fetch first)
- hint: not have locally. This is usually caused by another repository pushing
- Done
- hint: to the same ref. You may want to first integrate the remote changes
- hint: (e.g., 'git pull ...') before pushing again.
- 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企服之家,中国第一个企服评测及商务社交产业平台。 |