File tree 2 files changed +21
-0
lines changed
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)`.
144
144
* [ Apply commit from another repository] ( #apply-commit-from-another-repository )
145
145
* [ Specific fetch reference] ( #specific-fetch-reference )
146
146
* [ Find common ancestor of two branches] ( #find-common-ancestor-of-two-branches )
147
+ * [ List unpushed git commits] ( #list-unpushed-git-commits )
147
148
148
149
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
149
150
<!-- @doxie.inject end toc -->
@@ -979,5 +980,21 @@ git fetch origin master:refs/remotes/origin/mymaster
979
980
diff -u <( git rev-list --first-parent BranchA) <( git rev-list --first-parent BranchB) | sed -ne ' s/^ //p' | head -1
980
981
```
981
982
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
+
982
999
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
983
1000
<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 421
421
}, {
422
422
"title" : " Find common ancestor of two branches" ,
423
423
"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" ]
424
428
}]
You can’t perform that action at this time.
0 commit comments