English 中文(简体)
如果我有当地的变化,有时甚至不允许进行 g检查试验。
原标题:git checkout experiment is allowed sometimes and sometimes not if I have local changes
  • 时间:2010-03-26 14:32:58
  •  标签:
  • git

我有一个称为试验的分支。

git checkout master
echo  some changes  > a.txt
# now master branch has local changes which are not committed
git checkout experiment

有时 我已注意到,如果我有地方变化,我就不允许我转向另一个分支。 有时,如果我有地方变化,允许我转到另一个部门。

我失踪了什么?

最佳回答

摘录:

当更换分行时,如果你对目前分行和即将开关的分行之间不同的一个或多个档案进行当地修改,则该指挥部拒绝开关,以保持你对情况的修改。

因此,如果这些修改与各部门之间的差别没有任何关系(如你的例子),就会让你们转手。 如果各分支机构之间的争iff使你拥有的同一档案发生改变,则会拒绝——但你可以具体说明<条码>-/条码”的备选办法,使其在目前的分支部门、工作树和新的分支之间(从该分行起)进行三向合并。

要使这一描述更加完整:只有A、B和C卷才能证明主与实验之间的鸿沟。 如果在你的工作树中你修改了A,你将无法检查另一个分支。 但是,如果你修改D,你可以检查罚款。

问题回答

我不敢肯定这怎么做,但它试图防止你意外地过度做不相称的改动。 如果安理会决定你会发生冲突,我就认为......。





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签