1. 程式人生 > 其它 >git commit後如何刪除/撤回

git commit後如何刪除/撤回

技術標籤:githubgitgithub刪除commit撤回

我在stackoverflow中回答了該問題:

https://stackoverflow.com/a/66073093/12838403

Here I just post one clear pipeline to do so

Step1: Use git log to get the commit ID.

git log

enter image description here

Step2: Use git reset to go back to the former version:

git reset --hard <your commit id>