Is there a quick way to “git diff” from the point or branch origin?

后端 未结 7 1206
北恋
北恋 2020-12-23 11:21

I have looked at various SO answers on using git diff and git revisions (HEAD, ORIG_HEAD, FETCH_HEAD, etc.) and I still haven\'t found an easy way to list the c

7条回答
  •  误落风尘
    2020-12-23 12:03

    You can diff the current branch from the branch start point using:

    git diff (start point)...
    

    Where (start point) is a branch name, a commit-id, or a tag.

    Eg if you're working on a feature branch branched from develop, you can use:

    git diff develop...
    

    for all changes on the current branch since the branch point.

    This was already mentioned in a comment, but I think it deserves answer status. I don't know what it will do since last rebase.

提交回复
热议问题