git 回退单个文件版本

1. 查询所有历史提交记录:git log --pretty=oneline <filename>

2. 展示历史内容:git show <commit_id>

3. checkout对应的版本。 git checkout <hash> <filename>

4. 更新完先要的,内容就可以commit ,然后push

猜你喜欢

转载自www.cnblogs.com/blackEyeProgram/p/11562834.html
今日推荐