我運行了命令「git reset」,但我的unstaged更改已放入文件夾中。我得到像下面這樣運行git狀態後: Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard
我有一個棘手的情況。我需要刪除並重新提交一些我已經推送到github remote repo的提交。但是這些提交不再是HEAD(人們把它們推到頂端)。 我明白我可以恢復提交,因此保留提交歷史記錄。但要求是讓錯誤承諾消失。 所以: D <- other people's commit
|
C <- B and C are wrong commits! They need to be remove