解决git did not exit cleanly (exit code 1) (2718 ms @ 2018/8/23 14:40:53)的最好方法

情境再现:

git.exe push --progress "origin" zrc:zrc
To https://git.365power.cn:8443/winter/framework-commons-import.git
! [rejected]        zrc -> zrc (fetch first)
error: failed to push some refs to 'https://git.365power.cn:8443/winter/framework-commons-import.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
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.

分析问题:

  项目冲突,出现项目少的情况。由于我重新上传的时候,是拷Eclipse中的项目出来。把之前上传的给删掉了,而且拷的项目中删了一些文件。

意思就是,你提交的项目跟库里面存在的项目匹配不上。

解决问题:

  1. 重新pull新的项目出来。
  2. 然后再修改的文件中进行修改。

      3.提交commit

 

总结:每次提交新代码的时候,提交请求,之后做的就是等合并成功之后,拉项目出来,再进行修改,以便知道哪些文件是自己修改过的。

你可能感兴趣的:(git)