1
我做了git commit
進入我的本地分支,然後做git pull
。我是在遠程後面的一個提交,併合並了現在在git status
中顯示的所有遠程更改,就像我修改它們一樣,事實並非如此。所以我想撤消git pull
。我希望能夠使用git reset [email protected]{x}
來做到這一點,其中X是來自reflog的ID,然後再進行拉取。但是這個pull並沒有顯示在reflog中,我需要撤消它在本地所做的所有混亂。我該怎麼做?git拉不顯示在reflog - 想重置它
我以爲它沒有任何區別 – amphibient
哪個,使用'git reset commit_id' vs'git reset head @ {commit_id}'?第二個版本無效,它不會指向提交,所以它不會執行任何操作。如果你想引用一個提交,使用它的ID。 – meagar