我创建了一个新的分支并添加了一些文件。
在本地,我使用 Tortoise GIT,当我切换到新分支时,文件会被更新。
但是,在我的生产服务器上使用 CLI 时,当我使用 git checkout mynewbranch
切换到新分支时,文件不会被更新。
当我使用 git checkout origin/mynewbranch
切换时,文件会被更新,但我会收到以下消息:
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.
为什么会这样?