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

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 changes have been made since the beginning of the local branch, or since last rebase.

By easy I mean without having to look up and paste commit SHA or having to count how many commits I want to look back.

  • Can I merge one file|commit or I need to merge the whole files?
  • Git - Is it possible to restore to the state before I resolve conflicts wrong
  • What does 'git reset' command do without any option?
  • Can git track files but not show them as updated?
  • Can clang-format tell me if formatting changes are necessary?
  • A separate commit for conflict resolution with git merge
  • git diff origin/master is close, but it refers to remote which may have diverged since I checked out new branch from it.

    I would expect something like git diff BASE_HEAD to be available.

    …unless there’s already a way to do that. Does anyone have the answer?

  • Git - Your branch is ahead by 5 commits
  • What ReSharper files should I keep and what files should I ignore in Source Control?
  • git: push and pull for staging and production servers
  • how to read BitBucket/Stash branches and their linked JIRA tickets with Java
  • Git push error: unpack failed: index-pack abnormal exit
  • understanding git cherry-pick
  • 3 Solutions collect form web for “Is there a quick way to “git diff” from the point or branch origin?”

    Use git diff @{u}...HEAD, with three dots.

    With two dots, or with HEAD omitted, it will show diffs from changes on both sides.

    With three dots, it will only show diffs from changes on your side.

    Edit: for people with slightly different needs, you might be interested in git merge-base (note that it has plenty more options than the other answer uses).

    You can find the branch point using git merge-base. Consider master the mainline and dev the branch whose history you are interested in. To find the point at which dev was branched from master, run:

    git merge-base --fork-point master dev
    

    We can now diff dev against this basis:

    git diff $(git merge-base --fork-point master dev)..dev
    

    If dev is the current branch this simplifies to:

    git diff $(git merge-base --fork-point master)
    

    For more information see the git-merge-base documentation.

    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.

    Git Baby is a git and github fan, let's start git clone.