0
假設我有這些提交(字母是哈希數):如何將文件恢復到以前的承諾,但保持其他文件提交的最新
-a(initial commit)
-b(implemented feature request affected foo.php and bar.php)
-c(someone else's commit)
-d(someone experimented on foo.php/bar.php and forgot to discard changes)
-e(another commit)
-f(latest commit)
如何更改foo.php和bar.php到提交「c」期間的情況。 到目前爲止,我試過git reset c
和git reset --hard c
,但它改變了整個存儲庫。
另一種方法我試過到目前爲止是使回購和reset --hard c
另一個克隆,然後我手動複製粘貼foo.php和bar.php到我的工作拷貝,然後我演出和推動改變遙控器。