從Git中的分支刪除提交 - Delete commits from a branch in Git

問題:

I would like to know how to delete a commit. 我想知道如何刪除提交。 git

By delete , I mean it is as if I didn't make that commit, and when I do a push in the future, my changes will not push to the remote branch. 經過delete ,個人意思是好像我沒有進行該提交,而且之後進行推送時,所作的更改將不會推送到遠程分支。 this

I read git help, and I think the command I should use is git reset --hard HEAD . 我讀了git help,我認爲我應該使用的命令是git reset --hard HEAD Is this correct? 這個對嗎? spa


解決方案:

參考一: https://stackoom.com/question/5cGO/從Git中的分支刪除提交
參考二: https://oldbug.net/q/5cGO/Delete-commits-from-a-branch-in-Git
相關文章
相關標籤/搜索