晨风

-------------------- 业精于勤,荒于嬉;行成于思,毁于随

导航

git从历史commit中拉取分支

Posted on 2023-12-04 11:41  shenyixin  阅读(534)  评论(0编辑  收藏  举报

1、从某个commit拉取分支

      git checkout -<new branch name> <commit_id>

      例:git checkout -b test_branch 1f0a24f01e5

2、推送到远程

      git push -u origin 分支名

      例:git push -u origin test_branch

 

附:确定需要取出版本的commit_id

        git log