我在git checkout origin/master
命令行输入,首先给出以下提示:
Deletion of directory 'dirname1/dirname2' failed. Should I try again? (y/n)
每次我尝试时它几乎都会失败,所以我最终击中了 n。然后我得到这个:
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 c2850cd... - change description
之后我会这样做git branch
,这就是我所看到的:
* (no branch)
remote/branchname
master
为什么这样做?鉴于此,我如何对 origin/master 做出承诺?