git回滚到之前提交的某个版本

先显示提交的记录:

git log
commit e499aac9257354c54ac2e1ff6a393ac7c8d2f342
Author: xx <[email protected]>
...... 

回到指定版本:

git reset --hard e499aac9257354c54ac2e1ff6a393ac7c8d2f342

强制提交:

git push -f origin master

参考网址:
https://www.cnblogs.com/wancy86/p/5848024.html
膜拜大佬~~

猜你喜欢

转载自blog.csdn.net/qq_35790269/article/details/82734477
今日推荐