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