首页 > 编程知识 正文

git 切换到某一次commit,git还原到上一次提交

时间:2023-05-06 05:58:49 阅读:17376 作者:4198

c5f567是commit id

gitcheckoutc5f 567---- file1/to/restore file2/to/restoreifyouwanttoreverttothecommitbeforec5f 567,append~1 (whererer

gitcheckoutc5f 567至1--文件1/to/restore文件2/to/restorealsoyoucanusereset

git reset commit hash filename

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。