“git checkout ” is changing branch to “no branch”

后端 未结 5 539
没有蜡笔的小新
没有蜡笔的小新 2021-01-31 08:30

I am working on a branch in git. When I do

git checkout 

(commit id obtained from git log ), it is getting commit

5条回答
  •  温柔的废话
    2021-01-31 09:28

    By checking out to one of the commits in the history you are moving your git into so called 'detached state', which looks like is not what you want. Use this single command to create a new branch on one of the commits from the history:

    git checkout -b  
    

提交回复
热议问题