开发者

Restore a previous git commit?

开发者 https://www.devze.com 2023-01-18 11:45 出处:网络
Apparently some old bug fix commit of mine got dropped during a recent merg开发者_开发问答e of old branch into new.I found the commit in the logs and have the ID (403357cab89465ce68001762d35fe27b57aee

Apparently some old bug fix commit of mine got dropped during a recent merg开发者_开发问答e of old branch into new. I found the commit in the logs and have the ID (403357cab89465ce68001762d35fe27b57aeec65). Now I just want to restore that commit to the current working branch so I can firstly diff those changes but likely commit them all in again. How can I do this?

git checkout 403357cab89465ce68001762d35fe27b57aeec65

doesn't work.

And by the way, the commit involved edits to multiple files.


Do a git cherry-pick sha1 and it will pull that commit on top of your current HEAD.

0

精彩评论

暂无评论...
验证码 换一张
取 消