IntelliJ idea git提交代码冲突,取消commit

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/u010882234/article/details/88195570

在IntelliJ idea里使用git提交代码时,commit and push,commit发现冲突。git Pull之后发现有同事刚提交了代码,现在要取消commit,要怎么做?

很简单,git Pull之后,在Version Control里,选择log。选择需要回到的一条,右键,在重新定位head即可。因为这里的commit并没有把代码提交到仓库,只是在本地标记下。

猜你喜欢

转载自blog.csdn.net/u010882234/article/details/88195570