How can I go about rolling back to a specific commit in git?
(我该如何回滚到git中的特定提交?)
The best answer someone could give me was to use git revert
X times until I reach the desired commit.
(有人可以给我的最佳答案是使用git revert
X次,直到达到所需的提交。)
So let's say I want to revert back to a commit that's 20 commits old, I'd have to run it 20 times.
(假设我想恢复为20提交的旧提交,我必须运行20次。)
Is there an easier way to do this?
(有没有更简单的方法可以做到这一点?)
I can't use reset because this repository is public.
(我不能使用reset,因为此存储库是公共的。)
ask by David translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…