Git 将代码回到指定版本

将代码回到hash为1fbcb7ea3b43df60c639875d2bb68e20b451059e的版本

git checkout 1fbcb7ea3b43df60c639875d2bb68e20b451059e 

用下面代码 你还可以将指定版本设置为一个分支

git branch test2 1fbcb7ea3b43df60c639875d2bb68e20b451059e

 这样你只需 git checkout test2 就回到指定分支了

猜你喜欢

转载自www.cnblogs.com/zhangdongsheng/p/10099943.html
今日推荐