我的本地 Git 分支发生了什么?这是我运行的命令序列:
$ git fetch --all
$ git branch
* feature/myfeature1
master
branch-dev
$ git branch -a
* feature/myfeature1
master
branch-dev
remotes/origin/bugfix/bug-on-user
remotes/origin/feature/myfeature2
$ git checkout origin/bugfix/bug-on-user
M com.soc.data/.settings/org.eclipse.jdt.core.prefs
M com.soc.data/META-INF/MANIFEST.MF
Note: checking out 'origin/bugfix/bug-on-user'.
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 is now at d467d95... ...
$git branch
* (detached from origin/bugfix/bug-on-user)
feature/myfeature1
master
branch-dev
为什么我的分支是分离的?我做错了什么?