Git IDEA 回退代码到某一版本

it2022-05-05  141

目录

背景

操作

1.回退本地版本

2.同步远程分支


背景

第一天A提交了代码(版本1)

第二天B合并了代码(版本2)

第三天A提交了代码(版本3)

第四天A要在版本1上添加代码

操作

1.回退本地版本

点击项目 > [右键] > [Git]  > [Show History] > [Log] > [选择要回退的版本1] > [Reset Current Branch to Here] 

2.同步远程分支

点击项目  > [右键] >[Git]>[Repository]>[Push]>[Force Push]

参考:https://blog.csdn.net/woshi1226a/article/details/86664159

https://blog.csdn.net/qq_42928918/article/details/88406987


最新回复(0)