Skip to content

Commit

Permalink
Merge pull request #951 from tfendin/local-commits-all-remotes
Browse files Browse the repository at this point in the history
  • Loading branch information
spacewander authored Jan 6, 2022
2 parents 843b958 + 5467c2f commit 2025ebf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 32 deletions.
5 changes: 1 addition & 4 deletions bin/git-local-commits
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env bash

ref=$(git symbolic-ref HEAD)
branch=${ref#refs/heads/}

git log origin/${branch}..${branch} $*
git log @{upstream}..@ $*
21 changes: 4 additions & 17 deletions man/git-local-commits.1
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-LOCAL\-COMMITS" "1" "October 2017" "" "Git Extras"
.
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "GIT\-LOCAL\-COMMITS" "1" "January 2022" "" "Git Extras"
.SH "NAME"
\fBgit\-local\-commits\fR \- List local commits
.
.SH "SYNOPSIS"
\fBgit\-local\-commits\fR <args>
.
.SH "DESCRIPTION"
Lists commits in the local branch that have not been pushed to origin\.
.
Lists commits in the local branch that have not been pushed to the remote tracked branch\. This requires that HEAD points to a branch which is tracking another branch\.
.SH "OPTIONS"
<args>
.
.P
All arguments passed to \fBgit\-local\-commits\fR will be passed directly to \fBgit\-log\fR\.
.
.SH "EXAMPLES"
.
.nf

$ git local\-commits \-\-graph
.
.fi
.
.SH "AUTHOR"
Written by Michael Komitee <\fImkomitee@gmail\.com\fR>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/tj/git\-extras\fR>
21 changes: 11 additions & 10 deletions man/git-local-commits.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/git-local-commits.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ git-local-commits(1) -- List local commits

## DESCRIPTION

Lists commits in the local branch that have not been pushed to origin.
Lists commits in the local branch that have not been pushed to the remote tracked branch.
This requires that HEAD points to a branch which is tracking another branch.

## OPTIONS

Expand Down

0 comments on commit 2025ebf

Please sign in to comment.