I know how to see commit messages in git by git log
command, but it will list out all committed messages. What I want is those committed messages which have not been pushed that means only committed but not pushed. Do we have any command for this? I also have one solution, which is we can see all commits in github at the same time we can check with git log
command. difference will be my output but I want this through command.
Asked
Active
Viewed 1,941 times
-1

MrTux
- 32,350
- 30
- 109
- 146

Sumit Sahu
- 21
- 6
1 Answers
3
You can use a form of git-log
to show the difference between two branches:
git log origin/master..master
More information about different forms of git-log
.
Even better (expanding on @PetSerAL's comment) you could create a handy alias to see the same information with:
git config --global alias.justLocal "log @@{u}.."
So, whenever you wanted to see the results:
git justLocal

Jonathan.Brink
- 23,757
- 20
- 73
- 115
-
1Nice. I thought of `git cherry` (not to be confused with `cherry-pick`). `git cherry -v origin/master master` shows all commits in master that are not yet in origin/master prefixed with a `+`. But `git log`, esp. `git log --oneline` is _far_ better to read. – PerlDuck Mar 11 '16 at 19:25