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

后端 未结 5 586
没有蜡笔的小新
没有蜡笔的小新 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:29

    If you are branch master and you do a git checkout

    I'm fairly certain that this causes git to load that commit in a detached state, changing you out of the current branch.

    If you want to make changes you can and then you can do a git checkout -b to create a new branch based off that commit and any changes you have made.

提交回复
热议问题