将git重置 - 在主分支上混合会影响我的本地分支吗?

时间:2017-08-25 13:34:39

标签: git github

git的新手,请耐心等待......并为凌乱的视觉描绘道歉。

以下是我以为我在做的事情:

                              -<commit>-<commit>(A)
                             /
                             -<commit>(B)
                           /
  ...-<commit 123>-(Master)
                          \
                            -<commit>-<commit>-<commit>(C)

但是当git pull(master)上合并并合并时,git status然后说your branch is ahead of 'origin/master' by 6 commits(加上它不起作用!)。所以我想我有:

                              -<mix of commits, intended for A, B or C>(A)
                             /
                             -<commits intended for B>(B)
                           /
           ...-<commit 456>-<commit>-<commit>-<commit>-<commit>-(Master)
                          \
                           -<mix of commits, intended for B or C>(C)

git reset --mixed 456给我这个:

                              -<mix of commits, intended for A, B or C>(A)
                             /
                             -<commits intended for B>(B)
                           /
   ...-<commit 456>(Master)
                          \
                           -<mix of commits, intended for B or C>(C)

离开A,B和C?

无论哪种方式,这都是我想要的。我如何实现这一目标?

提前谢谢!

0 个答案:

没有答案