From 401e0a21e62a15fab0bb62f2bdece963933f02df Mon Sep 17 00:00:00 2001 From: Michael Komitee Date: Sat, 31 Mar 2012 13:54:30 -0400 Subject: [PATCH] Added git-local-commits: script to show a log of all commits not pushed to origin --- Readme.md | 5 ++ bin/git-local-commits | 6 ++ man/git-local-commits.1 | 36 ++++++++++++ man/git-local-commits.html | 117 +++++++++++++++++++++++++++++++++++++ man/git-local-commits.md | 32 ++++++++++ 5 files changed, 196 insertions(+) create mode 100755 bin/git-local-commits create mode 100644 man/git-local-commits.1 create mode 100644 man/git-local-commits.html create mode 100644 man/git-local-commits.md diff --git a/Readme.md b/Readme.md index 2d7706a..08aa2a4 100644 --- a/Readme.md +++ b/Readme.md @@ -56,6 +56,7 @@ $ brew install git-extras - `git refactor` - `git bug` - `git promote` + - `git local-commits` ## extras @@ -445,3 +446,7 @@ Set up a git repository (if one doesn't exist), add all files, and make an initi ## git-touch [filename] Call `touch` on the given file, and add it to the current index. One-step creation of new files. + +## git-local-commits + +List all commits on the local branch that have not yet been sent to origin. Any additional arguments will be passed directly to git log. diff --git a/bin/git-local-commits b/bin/git-local-commits new file mode 100755 index 0000000..170038e --- /dev/null +++ b/bin/git-local-commits @@ -0,0 +1,6 @@ +#!/bin/sh + +ref=$(git symbolic-ref HEAD) +branch=${ref#refs/heads/} + +git log origin/${branch}..${branch} $* diff --git a/man/git-local-commits.1 b/man/git-local-commits.1 new file mode 100644 index 0000000..059af61 --- /dev/null +++ b/man/git-local-commits.1 @@ -0,0 +1,36 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "GIT\-LOCAL\-COMMITS" "1" "March 2012" "" "Git Extras" +. +.SH "NAME" +\fBgit\-local\-commits\fR \- List local commits +. +.SH "SYNOPSIS" +\fBgit\-local\-commits\fR +. +.SH "DESCRIPTION" +Lists commits in the local branch that have not been pushed to origin\. +. +.SH "OPTIONS" + +. +.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" +<\fIhttp://github\.com/visionmedia/git\-extras/issues\fR> +. +.SH "SEE ALSO" +<\fIhttp://github\.com/visionmedia/git\-extras\fR> diff --git a/man/git-local-commits.html b/man/git-local-commits.html new file mode 100644 index 0000000..997eec6 --- /dev/null +++ b/man/git-local-commits.html @@ -0,0 +1,117 @@ + + + + + + git-local-commits(1) - List local commits + + + + +
+ + + +
    +
  1. git-local-commits(1)
  2. +
  3. Git Extras
  4. +
  5. git-local-commits(1)
  6. +
+ +

NAME

+

+ git-local-commits - List local commits +

+ +

SYNOPSIS

+ +

git-local-commits <args>

+ +

DESCRIPTION

+ +

Lists commits in the local branch that have not been pushed to origin.

+ +

OPTIONS

+ +

<args>

+ +

All arguments passed to git-local-commits will be passed directly to git-log.

+ +

EXAMPLES

+ +
$ git local-commits --graph
+
+ +

AUTHOR

+ +

Written by Michael Komitee <mkomitee@gmail.com>

+ +

REPORTING BUGS

+ +

<http://github.com/visionmedia/git-extras/issues>

+ +

SEE ALSO

+ +

<http://github.com/visionmedia/git-extras>

+ + +
    +
  1. +
  2. March 2012
  3. +
  4. git-local-commits(1)
  5. +
+ +
+ + diff --git a/man/git-local-commits.md b/man/git-local-commits.md new file mode 100644 index 0000000..80b3a4f --- /dev/null +++ b/man/git-local-commits.md @@ -0,0 +1,32 @@ +git-local-commits(1) -- List local commits +======================================= + +## SYNOPSIS + +`git-local-commits` <args> + +## DESCRIPTION + + Lists commits in the local branch that have not been pushed to origin. + +## OPTIONS + + <args> + + All arguments passed to `git-local-commits` will be passed directly to `git-log`. + +## EXAMPLES + + $ git local-commits --graph + +## AUTHOR + +Written by Michael Komitee <> + +## REPORTING BUGS + +<> + +## SEE ALSO + +<>