From 2b692f861f3f9eda7e01241319d08c1d390d79c3 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 10 Feb 2011 20:25:25 -0800 Subject: [PATCH 01/22] Added gh-pages command --- Readme.md | 5 +++++ bin/git-gh-pages | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 bin/git-gh-pages diff --git a/Readme.md b/Readme.md index cce0b4c..6a7f353 100644 --- a/Readme.md +++ b/Readme.md @@ -34,9 +34,14 @@ Brew (buggy): - git repl - git undo - git update-extras + - git gh-pages - git setup - git touch +## gh-pages + + Sets up the `gh-pages` branch. + ## git-contrib Output a user's contributions to a project, based on the author name: diff --git a/bin/git-gh-pages b/bin/git-gh-pages new file mode 100755 index 0000000..40fda3f --- /dev/null +++ b/bin/git-gh-pages @@ -0,0 +1,12 @@ +#!/bin/sh + +echo 'setting up gh-pages' +git symbolic-ref HEAD refs/heads/gh-pages \ + && rm .git/index \ + && git clean -fdx \ + && echo 'My Page' > index.html \ + && git add . \ + && git commit -a -m 'Initial commit' \ + && git push origin gh-pages \ + && git fetch origin \ + && echo 'complete' \ No newline at end of file From a867eb0f5cb5d189c9333da4d27de7742e77e5d8 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 10 Feb 2011 20:26:00 -0800 Subject: [PATCH 02/22] Release 0.1.0 --- History.md | 5 +++++ bin/git-extras-version | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 3bd3ea4..a77455c 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.1.0 / 2011-02-10 +================== + + * Added `gh-pages` command + 0.0.7 / 2010-10-31 ================== diff --git a/bin/git-extras-version b/bin/git-extras-version index 130494f..949aa3a 100755 --- a/bin/git-extras-version +++ b/bin/git-extras-version @@ -1,2 +1,2 @@ #!/bin/sh -echo "0.0.7" \ No newline at end of file +echo "0.1.0" \ No newline at end of file From 5ce9bb7147791b3a9622b51f9ee4000308660735 Mon Sep 17 00:00:00 2001 From: "Jens K. Mueller" Date: Fri, 11 Feb 2011 14:21:09 +0100 Subject: [PATCH 03/22] Create install dir before copying --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 4889096..d41fa3d 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ MAN_PAGES = $(MANS:.md=.1) install: @mkdir -p $(MANPREFIX) + @mkdir -p $(PREFIX)/bin @echo "... installing bins to $(PREFIX)/bin" @echo "... installing man pages to $(MANPREFIX)" @$(foreach BIN, $(BINS), \ From 1304fdc92471e74a17caae4ce76e3742ea98266e Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 22 Mar 2011 17:43:33 -0700 Subject: [PATCH 04/22] Added LICENSE --- LICENSE | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b35b32b --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2010-2011 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file From a27221189529378b4b4274a813aa24d9d4d106f2 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 23 Mar 2011 08:57:30 -0700 Subject: [PATCH 05/22] Added git-feature --- bin/git-feature | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/git-feature diff --git a/bin/git-feature b/bin/git-feature new file mode 100755 index 0000000..67765ee --- /dev/null +++ b/bin/git-feature @@ -0,0 +1,13 @@ +#!/bin/sh + +if test "$1" = "finish"; then + test -z $2 && echo "feature required." && exit 1 + branch=feature/$2 + git merge --no-ff $branch +else + test -z $1 && echo "feature required." && exit 1 + branch=feature/$1 + git checkout -b $branch &> /dev/null + git checkout $branch &> /dev/null + echo "on branch $branch" +fi \ No newline at end of file From 5578905323d6743b02ff901a746e0e494e0e42fc Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 23 Mar 2011 16:00:05 -0700 Subject: [PATCH 06/22] Added git-bug --- bin/git-bug | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/git-bug diff --git a/bin/git-bug b/bin/git-bug new file mode 100755 index 0000000..9d94f32 --- /dev/null +++ b/bin/git-bug @@ -0,0 +1,13 @@ +#!/bin/sh + +if test "$1" = "finish"; then + test -z $2 && echo "bug required." && exit 1 + branch=bug/$2 + git merge --no-ff $branch +else + test -z $1 && echo "bug required." && exit 1 + branch=bug/$1 + git checkout -b $branch &> /dev/null + git checkout $branch &> /dev/null + echo "on branch $branch" +fi \ No newline at end of file From 9a6324eab836a0105c9b633becdb9b47e6217dc5 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 23 Mar 2011 17:29:26 -0700 Subject: [PATCH 07/22] delete branch after merge --- bin/git-bug | 3 +-- bin/git-feature | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/git-bug b/bin/git-bug index 9d94f32..c86adc0 100755 --- a/bin/git-bug +++ b/bin/git-bug @@ -3,11 +3,10 @@ if test "$1" = "finish"; then test -z $2 && echo "bug required." && exit 1 branch=bug/$2 - git merge --no-ff $branch + git merge --no-ff $branch && git delete-branch $branch else test -z $1 && echo "bug required." && exit 1 branch=bug/$1 git checkout -b $branch &> /dev/null git checkout $branch &> /dev/null - echo "on branch $branch" fi \ No newline at end of file diff --git a/bin/git-feature b/bin/git-feature index 67765ee..42e6b3a 100755 --- a/bin/git-feature +++ b/bin/git-feature @@ -3,11 +3,10 @@ if test "$1" = "finish"; then test -z $2 && echo "feature required." && exit 1 branch=feature/$2 - git merge --no-ff $branch + git merge --no-ff $branch && git delete-branch $branch else test -z $1 && echo "feature required." && exit 1 branch=feature/$1 git checkout -b $branch &> /dev/null git checkout $branch &> /dev/null - echo "on branch $branch" fi \ No newline at end of file From 27e8049fd7632d1ba6eb4d9296cb2ffb78cfd2b1 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 26 Mar 2011 16:00:50 -0700 Subject: [PATCH 08/22] Make sure to get the last chronological tag, instead of relying on the bogus `git tag` sorting. --- bin/git-changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/git-changelog b/bin/git-changelog index 5ce5880..c7c390c 100755 --- a/bin/git-changelog +++ b/bin/git-changelog @@ -6,7 +6,8 @@ DATE=`date +'%Y-%m-%d'` HEAD="\nn.n.n / $DATE \n==================\n" if test "$1" = "--list"; then - version=`git tag | tail -n 1` + version=`git for-each-ref refs/tags --sort=-authordate --format='%(refname)' \ + --count=1 | sed 's/^refs\/tags\///'` if test -z "$version"; then git log --pretty="format: * %s" else @@ -20,4 +21,4 @@ else if [ -f $CHANGELOG ]; then cat $CHANGELOG >> $tmp; fi mv $tmp $CHANGELOG test -n "$EDITOR" && $EDITOR $CHANGELOG -fi \ No newline at end of file +fi From 9e5b89842b3631730a5320b460f2426eb3b2409e Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Sun, 27 Mar 2011 09:01:40 -0700 Subject: [PATCH 09/22] Added `git-extras`, removed `git-extras-version` and `git-extras-update` --- bin/git-extras | 20 +++++++ bin/git-extras-version | 2 - bin/git-update-extras | 13 ---- man/git-extras.1 | 59 +++++++++++++++++++ ...git-update-extras.html => git-extras.html} | 38 +++++++----- man/git-extras.md | 30 ++++++++++ man/git-graft.1 | 4 +- man/git-graft.html | 8 +-- man/git-graft.md | 2 +- man/git-ignore.1 | 12 ++-- man/git-ignore.html | 8 +-- man/git-ignore.md | 2 +- man/git-update-extras.1 | 22 ------- man/git-update-extras.md | 22 ------- 14 files changed, 151 insertions(+), 91 deletions(-) create mode 100755 bin/git-extras delete mode 100755 bin/git-extras-version delete mode 100755 bin/git-update-extras create mode 100644 man/git-extras.1 rename man/{git-update-extras.html => git-extras.html} (67%) create mode 100644 man/git-extras.md delete mode 100644 man/git-update-extras.1 delete mode 100644 man/git-update-extras.md diff --git a/bin/git-extras b/bin/git-extras new file mode 100755 index 0000000..e6d1d47 --- /dev/null +++ b/bin/git-extras @@ -0,0 +1,20 @@ +#!/bin/sh + +VERSION="0.1.0" + +update() { + local orig=$PWD + cd /tmp \ + && rm -fr ./git-extras \ + && git clone --depth 1 http://github.com/visionmedia/git-extras.git \ + && cd git-extras \ + && make install \ + && cd $orig \ + && echo "... updated git-extras $VERSION -> $(git extras --version)" +} + +case "$1" in + -v|--version) echo $VERSION && exit 0 ;; + update) update ;; + *) man git-extras ;; +esac \ No newline at end of file diff --git a/bin/git-extras-version b/bin/git-extras-version deleted file mode 100755 index 949aa3a..0000000 --- a/bin/git-extras-version +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo "0.1.0" \ No newline at end of file diff --git a/bin/git-update-extras b/bin/git-update-extras deleted file mode 100755 index 84e8ef0..0000000 --- a/bin/git-update-extras +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -orig=$PWD -version=`git extras-version` - -cd /tmp \ - && rm -fr ./git-extras \ - && git clone --depth 1 http://github.com/visionmedia/git-extras.git \ - && cd git-extras \ - && make install \ - && cd $orig \ - && echo "... updated to git-extras $version" - \ No newline at end of file diff --git a/man/git-extras.1 b/man/git-extras.1 new file mode 100644 index 0000000..05dfea3 --- /dev/null +++ b/man/git-extras.1 @@ -0,0 +1,59 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "GIT\-EXTRAS" "1" "March 2011" "" "Git Extras" +. +.SH "NAME" +\fBgit\-extras\fR \- Awesome GIT utilities +. +.SH "COMMANDS" +. +.IP "\(bu" 4 +\fBgit\-changelog\fR changelog population +. +.IP "\(bu" 4 +\fBgit\-commits\-since\fR show commit logs since some date +. +.IP "\(bu" 4 +\fBgit\-contrib\fR show a user\'s contribution +. +.IP "\(bu" 4 +\fBgit\-count\fR show commit count +. +.IP "\(bu" 4 +\fBgit\-fresh\-branch\fR create fresh branches +. +.IP "\(bu" 4 +\fBgit\-graft\fR merge and destroy a given branch +. +.IP "\(bu" 4 +\fBgit\-ignore\fR add \.gitignore patterns +. +.IP "\(bu" 4 +\fBgit\-release\fR commit, tag and push changes to the repository +. +.IP "\(bu" 4 +\fBgit\-setup\fR set up a git repository with initial commit +. +.IP "\(bu" 4 +\fBgit\-repl\fR GIT read\-eval\-print\-loop +. +.IP "\(bu" 4 +\fBgit\-summary\fR repository summary & contrib +. +.IP "\(bu" 4 +\fBgit\-touch\fR touch and add file to the index +. +.IP "\(bu" 4 +\fBgit\-undo\fR undo one or more of the latest commits +. +.IP "" 0 +. +.SH "AUTHOR" +Written by Tj Holowaychuk <\fItj@vision\-media\.ca\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-update-extras.html b/man/git-extras.html similarity index 67% rename from man/git-update-extras.html rename to man/git-extras.html index 0405535..994b034 100644 --- a/man/git-update-extras.html +++ b/man/git-extras.html @@ -3,7 +3,7 @@ - git-update-extras(1) - Updates git extras + git-extras(1) - Awesome GIT utilities + + + +
+ + + +
    +
  1. git-pull-request(1)
  2. +
  3. Git Extras
  4. +
  5. git-pull-request(1)
  6. +
+ +

NAME

+

+ git-pull-request - Pulls a github request +

+ +

SYNOPSIS

+ +

git-pull-request [number]

+ +

DESCRIPTION

+ +

Pulls the given request number the project in the CWD and applies it via git am.

+ +

EXAMPLES

+ +

Pull https://github.com/visionmedia/express/pull/604.

+ +
$ cd projects/express
+$ git pull-request 604
+
+ +

AUTHOR

+ +

Written by TJ Holowaychuk <tj@vision-media.ca>

+ +

REPORTING BUGS

+ +

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

+ +

SEE ALSO

+ +

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

+ + +
    +
  1. +
  2. March 2011
  3. +
  4. git-pull-request(1)
  5. +
+ +
+ + diff --git a/man/git-pull-request.md b/man/git-pull-request.md new file mode 100644 index 0000000..11f737f --- /dev/null +++ b/man/git-pull-request.md @@ -0,0 +1,29 @@ +git-pull-request(1) -- Pulls a github request +==================================== + +## SYNOPSIS + +`git-pull-request` [number] + +## DESCRIPTION + + Pulls the given request number the project in the __CWD__ and applies it via `git am`. + +## EXAMPLES + + Pull https://github.com/visionmedia/express/pull/604. + + $ cd projects/express + $ git pull-request 604 + +## AUTHOR + +Written by TJ Holowaychuk <> + +## REPORTING BUGS + +<> + +## SEE ALSO + +<> diff --git a/man/git-undo.1 b/man/git-undo.1 index b4b6404..3dbc81c 100644 --- a/man/git-undo.1 +++ b/man/git-undo.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "GIT\-UNDO" "1" "October 2010" "" "Git Extras" +.TH "GIT\-UNDO" "1" "March 2011" "" "Git Extras" . .SH "NAME" \fBgit\-undo\fR \- Remove latest commits diff --git a/man/git-undo.html b/man/git-undo.html index 0c8635e..5149dd7 100644 --- a/man/git-undo.html +++ b/man/git-undo.html @@ -102,7 +102,7 @@

AUTHOR

-

Written by Kenneth Reitz <me@kennethreitz.com>

+

Written by Kenneth Reitz <me@kennethreitz.com>

REPORTING BUGS

@@ -115,7 +115,7 @@
  1. -
  2. October 2010
  3. +
  4. March 2011
  5. git-undo(1)
From 0b97430c8d87a7c91f1313410c1ece2d9d184d5f Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 29 Mar 2011 08:58:43 -0700 Subject: [PATCH 16/22] Release 0.3.0 --- History.md | 5 +++++ bin/git-extras | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index fdb8051..1b90181 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.3.0 / 2011-03-29 +================== + + * Added `git-pull-request` + 0.2.0 / 2011-03-27 ================== diff --git a/bin/git-extras b/bin/git-extras index 188f380..7e53e89 100755 --- a/bin/git-extras +++ b/bin/git-extras @@ -1,6 +1,6 @@ #!/bin/sh -VERSION="0.2.0" +VERSION="0.3.0" update() { local orig=$PWD From 7d68c2bc7d02046363aaf0eadbcead4c16010572 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Sun, 3 Apr 2011 09:30:16 -0700 Subject: [PATCH 17/22] Added git-refactor --- bin/git-refactor | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/git-refactor diff --git a/bin/git-refactor b/bin/git-refactor new file mode 100755 index 0000000..68182f2 --- /dev/null +++ b/bin/git-refactor @@ -0,0 +1,12 @@ +#!/bin/sh + +if test "$1" = "finish"; then + test -z $2 && echo "refactor required." && exit 1 + branch=refactor/$2 + git merge --no-ff $branch && git delete-branch $branch +else + test -z $1 && echo "refactor required." && exit 1 + branch=refactor/$1 + git checkout -b $branch &> /dev/null + git checkout $branch &> /dev/null +fi \ No newline at end of file From ec0a1d655b6433405ba4785daac02838e56eedf9 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 5 Apr 2011 02:55:02 -0700 Subject: [PATCH 18/22] docs --- Readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Readme.md b/Readme.md index 2d175d6..5aa2286 100644 --- a/Readme.md +++ b/Readme.md @@ -38,6 +38,9 @@ Brew (buggy): - git gh-pages - git setup - git touch + - git feature + - git refactor + - git bug ## extras @@ -51,6 +54,24 @@ For example if you wish to update to the latest version of git-extras simply exe Sets up the `gh-pages` branch. +## git-[feature|refactor|bug] [finish] <name> + + Creates the given feature, refactor, or bug branch `name`: + + $ git feature dependencies + + Later we can check it out by issuing the same command: + + $ git checkout master + $ git feature dependencies + + Finally when finished, we can add `finish`, merging it into the current branch: + + $ git checkout master + $ git feature finish dependencies + + `feature` can be replaced with `bug`, or `refactor`. + ## git-pull-request <number> Pulls the given request `number` from github, and applies it From 6de78f63f4dd7255ef7fe3b5f5bfb0e2ece213dd Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 5 Apr 2011 02:55:57 -0700 Subject: [PATCH 19/22] Release 0.4.0 --- History.md | 7 +++++++ bin/git-extras | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 1b90181..8e1962b 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,11 @@ +0.4.0 / 2011-04-05 +================== + + * Added `git-refactor` + * Added `git-bug` + * Added `git-feature` + 0.3.0 / 2011-03-29 ================== diff --git a/bin/git-extras b/bin/git-extras index 7e53e89..2d41af9 100755 --- a/bin/git-extras +++ b/bin/git-extras @@ -1,6 +1,6 @@ #!/bin/sh -VERSION="0.3.0" +VERSION="0.4.0" update() { local orig=$PWD From 2d94afe185b8db8aa2c73f7672a2c7b534232219 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 5 Apr 2011 09:08:34 -0400 Subject: [PATCH 20/22] git-graft now defaults to current branch instead of master Signed-off-by: Tj Holowaychuk --- bin/git-graft | 2 +- man/git-graft.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/git-graft b/bin/git-graft index ad212f7..cbd15e7 100755 --- a/bin/git-graft +++ b/bin/git-graft @@ -2,7 +2,7 @@ test -z $1 && echo "source branch required." && exit 1 src=$1 -dst=${2-master} +dst=${2-} git checkout $dst \ && git merge --no-ff $src \ diff --git a/man/git-graft.md b/man/git-graft.md index 0e913ff..28c554c 100644 --- a/man/git-graft.md +++ b/man/git-graft.md @@ -7,7 +7,7 @@ git-graft(1) -- Merge and destroy a given branch ## DESCRIPTION - Merge commits from <src-branch> into <dest-branch> which defaults to <master>. + Merge commits from <src-branch> into <dest-branch> which defaults to the current branch. ## OPTIONS From dcd1f2ecfeb3c57c7017b17f6d144f600e32fd74 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 5 Apr 2011 13:20:41 -0700 Subject: [PATCH 21/22] refactor git-graft --- bin/git-graft | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-graft b/bin/git-graft index cbd15e7..aed5728 100755 --- a/bin/git-graft +++ b/bin/git-graft @@ -2,7 +2,7 @@ test -z $1 && echo "source branch required." && exit 1 src=$1 -dst=${2-} +dst=$2 git checkout $dst \ && git merge --no-ff $src \ From a0de28fe07df301fd4ff760e3aa288ebb25a0668 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 5 Apr 2011 13:22:46 -0700 Subject: [PATCH 22/22] Release 0.4.1 --- History.md | 5 +++++ bin/git-extras | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 8e1962b..10a3611 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.4.1 / 2011-04-05 +================== + + * Changed; `git-graft` now defaults to current branch instead of master [Kenneth Reitz] + 0.4.0 / 2011-04-05 ================== diff --git a/bin/git-extras b/bin/git-extras index 2d41af9..5f436c2 100755 --- a/bin/git-extras +++ b/bin/git-extras @@ -1,6 +1,6 @@ #!/bin/sh -VERSION="0.4.0" +VERSION="0.4.1" update() { local orig=$PWD