git从历史commit中拉取分支

1、从某个commit拉取分支

      git checkout -b <branch name> <commit_id>

      例:git checkout -b trms_branch f31de460b2a

2、推送到远程

      git push -u origin 分支名

      例:git push -u origin trms_branch

 

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

        git log

 

posted @ 2023-05-10 11:25  coco9821  阅读(1588)  评论(0编辑  收藏  举报