我想跑
git revert ########
字符串
在我的编辑器(PyCharm)中解决了合并冲突之后,我运行
git revert --continue
型
然后得到以下消息
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
You are currently reverting commit ########.
(all conflicts fixed: run "git revert --continue")
(use "git revert --skip" to skip this patch)
(use "git revert --abort" to cancel the revert operation)
nothing to commit, working tree clean
型
然而,如果我在目标提交时查看我的存储库,我可以清楚地看到requirements.txt文件中的差异(我确信还有其他文件)。
git revert --continue
型
再次如响应/提示中所建议的,它将再次呈现相同的响应,
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
You are currently reverting commit ########.
(all conflicts fixed: run "git revert --continue")
(use "git revert --skip" to skip this patch)
(use "git revert --abort" to cancel the revert operation)
nothing to commit, working tree clean
型
1条答案
按热度按时间lnvxswe21#
事实证明,我实际上在寻找的是git reset。我没有意识到git revert只针对特定的提交。这就是为什么我可以看到其他文件中相同位置的git提交的更改没有被更改。