git checkout the_branch 切换分支
git pull
git branch the_branch_backup 备份一下这个分支当前的情况
git reset --hard the_commit_id 把the_branch本地回滚到the_commit_id
git push origin :the_branch 删除远程 the_branch
git push origin the_branch //用回滚后的本地分支重新建立远程分支
git push origin :the_branch_backup //如果前面都成功了,删除这个备份分支
常用工具-git分支重建
最新推荐文章于 2024-07-22 15:49:29 发布