File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
144144* [ Apply commit from another repository] ( #apply-commit-from-another-repository )
145145* [ Specific fetch reference] ( #specific-fetch-reference )
146146* [ Find common ancestor of two branches] ( #find-common-ancestor-of-two-branches )
147+ * [ List unpushed git commits] ( #list-unpushed-git-commits )
147148
148149<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
149150<!-- @doxie.inject end toc -->
@@ -979,5 +980,21 @@ git fetch origin master:refs/remotes/origin/mymaster
979980diff -u <( git rev-list --first-parent BranchA) <( git rev-list --first-parent BranchB) | sed -ne ' s/^ //p' | head -1
980981```
981982
983+ ## List unpushed git commits
984+ ``` sh
985+ git log --branches --not --remotes
986+ ```
987+
988+
989+ __ Alternatives:__
990+ ``` sh
991+ git log @{u}..
992+ ```
993+
994+
995+ ``` sh
996+ git cherry -v
997+ ```
998+
982999<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
9831000<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 421421}, {
422422 "title" : " Find common ancestor of two branches" ,
423423 "tip" : " diff -u <(git rev-list --first-parent BranchA) <(git rev-list --first-parent BranchB) | sed -ne 's/^ //p' | head -1"
424+ }, {
425+ "title" : " List unpushed git commits" ,
426+ "tip" : " git log --branches --not --remotes" ,
427+ "alternatives" : [" git log @{u}.." , " git cherry -v" ]
424428}]
You can’t perform that action at this time.
0 commit comments