我刚刚在本地克隆了一个存储库。我们预计将始终使用已经是存储库一部分的开发分支。当我列出所有的分支如下:Git结账 - 如何
git branch -a
结果如下:
master (with an *)
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/master
我现在该如何签的发展分支,开始工作。 当我刚刚说
git checkout
Checking out files: 100% (2436/2436), done.
Note: checking out 'develop'.
enter code here`
enter code here`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.
如果你想创建一个新的分支保留你创建提交,您可以 再次使用-b与checkout命令这样做(现在或以后)。例如
git checkout -b new_branch_name
如果我签使用,这似乎是创建一个新的本地分支
git checkout -b new_branch_name
想到的另一种选择是
git checkout -b develop origin/develop
很明显,我缺少对Git分支的一些基本理解。 我想澄清上述问题,以及分支机构在远程分支机构上的工作原理。
“我们期待”,我会假设你会得到在职有关如何使用所需工具的培训,您应该与您的团队负责人核对,看看这种培训有哪些选择。 –
@ user2186453,有没有任何答案可以帮助你解决问题?如果是,请标记它,因为它会帮助那些有类似问题的人。 –