个人操作过程如下:
1、git上建立远程仓库(空)
2、本地建立项目,包括.iml、.ignore文件
3、VCS -> import into version control -> create git respository 选中要推的项目
4、选中项目根目录,git -> add
5、git -> commit directory
6、commit and push
7、跳出的框中,选择远程分支,remote,把git的地址复制进去
8、点击push
此时出现git push reject 推送失败
解决:打开项目根路径,git bash here,输入git pull origin master --allow-unrelated-histories
然后切换英文输入 :wq 回车,继续push,成功
可参考:idea上提交项目到gitee 最后出现 Push rejected的问题处理方法
git提交push reject的问题
最新推荐文章于 2024-01-29 15:56:19 发布