How do I see the commit differences between branches in git?

后端 未结 10 974
太阳男子
太阳男子 2020-12-04 04:13

I\'m on branch-X and have added a couple more commits on top of it. I want to see all the differences between MASTER and the branch that I am on in terms of commits. I could

10条回答
  •  难免孤独
    2020-12-04 04:59

    If you are on Linux, gitg is way to go to do it very quickly and graphically.

    If you insist on command line you can use:

    git log --oneline --decorate
    

    To make git log nicer by default, I typically set these global preferences:

    git config --global log.decorate true
    git config --global log.abbrevCommit true
    

提交回复
热议问题