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

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

    Is that commit in the other branch? Git checkout will just switch over to the other branch if the commit has happened in the other branch. You will want to merge the changes to your first branch if you want the code there.

提交回复
热议问题