Git merge confusion. Diff shows differences, and merge says there are none

后端 未结 2 1941
感动是毒
感动是毒 2021-01-23 17:21

Im starting to learn to use git, and I am having a situation that I dont understand (the repository was taken out of svn)

Im on a branch jacob@379 with ever

相关标签:
2条回答
  • 2021-01-23 17:38

    It's possible that there's nothing new to merge but the your branch has changes not in master. Such differences would also be reflected in commits so a simple check you can do is to check the logs:

    # See what's in my branch but not master
    git log master..jacob@379
    
    # See what's in master but not my branch
    git log jacob@379..master
    

    I'm guessing you'll see some commits there. Imagine it this way:

    o---o---A---B---C      master
             \       \
              ----D---E---F   jacob@379
    

    In this case there's nothing new to merge into jacob@379 but the two branches are still quite clearly different.

    A quick look at gitk --all would probably be really useful here.

    0 讨论(0)
  • 2021-01-23 17:58

    I think the problem is here:

    warning: refname 'jacob@379' is ambiguous.
    

    try HEAD instead of jacob@379

    But still, probably gotta get an unambiguous branch name. I think the @ has a special meaning. Or maybe you have a tag or other ref with the same name?

    Also, it's great to pop open a graphical program that shows you all the tags and branches and all that with lines. If you've got it, try: gitk --all

    0 讨论(0)
提交回复
热议问题