Git Rev-List List Commits in master but not in origin/master

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

git rev-list --oneline master ^origin/master 

Git rev-list will list commits in one branch that are not in another branch. It is a great tool when you're trying to figure out if code has been merged into a branch or not.

  • Using the --oneline option will display the title of each commit.
  • The ^ operator excludes commits in the specified branch from the list.
  • You can pass more than two branches if you want. For example, git rev-list foo bar ^baz lists commits in foo and bar, but not baz.


Got any Git Question?