zoukankan      html  css  js  c++  java
  • git根据某个commit创建分支

    git checkout  commit_ID 切换到对应的commit

    [root@devops itrafficFront]# git checkout e72378370354786e954bb1bd752dc2c1f566f512
    Note: checking out 'e72378370354786e954bb1bd752dc2c1f566f512'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b new_branch_name
    
    HEAD 目前位于 e723783... 修改解析状态错误bug
    
    //基于此commit创建hainan分支并切换到hainan分支
    [root@devops itrafficFront]# git checkout -b hainan
    切换到一个新分支 'hainan'
    [root@devops itrafficFront]# git branch 
      develop
    * hainan
    
    //推送到远程
    [root@devops itrafficFront]# git push -u origin hainan
  • 相关阅读:
    bugku 字符正则
    Bugku,never never never give up
    Bugku各种绕过哟
    BUGKU的flag.php
    7.15 Java自学
    7.14 Java自学
    7.13 Java自学
    7.12 Java自学
    7.11 Java自学
    7.10 Java自学
  • 原文地址:https://www.cnblogs.com/linyouyi/p/13971290.html
Copyright © 2011-2022 走看看