git diff - Viewing unpushed Git commits

ID : 429

viewed : 155

Tags : gitgit-diffgit-loggit





Top 5 Answer for git diff - Viewing unpushed Git commits

vote vote

99

git log origin/master..HEAD 

You can also view the diff using the same syntax

git diff origin/master..HEAD 
vote vote

87

If you want to see all commits on all branches that aren't pushed yet, you might be looking for something like this:

git log --branches --not --remotes 

And if you only want to see the most recent commit on each branch, and the branch names, this:

git log --branches --not --remotes --simplify-by-decoration --decorate --oneline 
vote vote

77

You can show all commits that you have locally but not upstream with

git log @{u}.. 

@{u} or @{upstream} means the upstream branch of the current branch (see git rev-parse --help or git help revisions for details).

vote vote

66

This worked for me:

git cherry -v  

As indicated at Git: See all unpushed commits or commits that are not in another branch.

vote vote

57

You can do this with git log:

git log origin/master.. 

This assumes that origin is the name of your upstream remote and master is the name of your upstream branch. Leaving off any revision name after .. implies HEAD, which lists the new commits that haven't been pushed.

Top 3 video Explaining git diff - Viewing unpushed Git commits







Related QUESTION?