mirror of
https://github.com/namibia/tips.git
synced 2024-12-22 18:18:58 +00:00
List unpushed git commits.
This commit is contained in:
parent
b869dd5efd
commit
a7cb20ee0f
17
README.md
17
README.md
@ -144,6 +144,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
||||
* [Apply commit from another repository](#apply-commit-from-another-repository)
|
||||
* [Specific fetch reference](#specific-fetch-reference)
|
||||
* [Find common ancestor of two branches](#find-common-ancestor-of-two-branches)
|
||||
* [List unpushed git commits](#list-unpushed-git-commits)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
@ -979,5 +980,21 @@ git fetch origin master:refs/remotes/origin/mymaster
|
||||
diff -u <(git rev-list --first-parent BranchA) <(git rev-list --first-parent BranchB) | sed -ne 's/^ //p' | head -1
|
||||
```
|
||||
|
||||
## List unpushed git commits
|
||||
```sh
|
||||
git log --branches --not --remotes
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git log @{u}..
|
||||
```
|
||||
|
||||
|
||||
```sh
|
||||
git cherry -v
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
@ -421,4 +421,8 @@
|
||||
}, {
|
||||
"title": "Find common ancestor of two branches",
|
||||
"tip": "diff -u <(git rev-list --first-parent BranchA) <(git rev-list --first-parent BranchB) | sed -ne 's/^ //p' | head -1"
|
||||
}, {
|
||||
"title": "List unpushed git commits",
|
||||
"tip": "git log --branches --not --remotes",
|
||||
"alternatives": ["git log @{u}..", "git cherry -v"]
|
||||
}]
|
||||
|
Loading…
Reference in New Issue
Block a user