Skip to content

Commit

Permalink
merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed May 19, 2011
2 parents 5117150 + b194a23 commit 11ee5ed
Show file tree
Hide file tree
Showing 19 changed files with 640 additions and 114 deletions.
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

116 changes: 62 additions & 54 deletions History.md
@@ -1,4 +1,13 @@

0.0.8 / 2011-02-22
==================

* Added `git-create-branch`.
* Refactoring to adopt uniq code style across the scripts.
* git-release: Use annotated tags to release commits instead of lightweight tags.
* git-setup: Create a directory if the provided one doesn't exist yet.
* Fixed `git-ignore`: Don't fail if `.gitignore` file doesn't exist yet.

0.4.1 / 2011-04-05
==================

Expand Down Expand Up @@ -33,79 +42,78 @@
0.0.7 / 2010-10-31
==================

* Added man pages [Jonhnny Weslley]
* Added `make clean`
* Added `make docs`
* Added -d -> -D. Closes #15
* Added git-delete-submodule for delete submodules easily [Jonhnny Weslley]
* Added; `git-ignore` now shows the contents of _./.git-ignore_ if no args are present
* Added man pages.
* Added `make clean`.
* Added `make docs`.
* Added -d -> -D. Closes #15.
* Added git-delete-submodule for delete submodules easily.
* Added; `git-ignore` now shows the contents of _./.git-ignore_ if no args are present.

0.0.6 / 2010-10-22
==================

* Added command `git-touch`. [Alex McHale]
* Use a shallow clone in `git-update-extras`. [Devin Withers]
* Create History.md if git-changelog can't find a target. Fixes #14. [Devin Withers]
* Bump version
* Added command `git-touch`.
* Use a shallow clone in `git-update-extras`.
* Create History.md if git-changelog can't find a target. Fixes #14.

0.0.5 / 2010-10-08
==================

* Added `git-delete-submodule` [Jonhnny Weslley]
* Added; `git-ignore` without pattern shows .gitignore contents [Jonhnny Weslley]
* Added; `git-setup` argument is now optional, defaulting to the CWD
* Added REPL alias "ls" as ls-files
* Added `git-delete-submodule`.
* Added; `git-ignore` without pattern shows .gitignore contents.
* Added; `git-setup` argument is now optional, defaulting to the CWD.
* Added REPL alias "ls" as ls-files.

0.0.4 / 2010-09-10
==================

* Added: `git-delete-branch`: Also delete the remote branch [Gert Van Gool]
* Added `git-summary` commitish support [Jonathan Leto]
* Added `git-graft` dest branch default of _master_
* Added `git-setup` [Aggelos Orfanakos]
* Added `git-graft` [Kenneth Reitz]
* Added `git-undo` for removing recent commits. [Kenneth Reitz]
* Fixed `git-delete-branch`: Don't fail if the local branch doesn't exist [Gert Van Gool]
* Fixed __PREFIX__ to respect env vars
* Fixed shift in `git-count`

0.0.3 / 2010-08-27
* Added: `git-delete-branch`: Also delete the remote branch.
* Added `git-summary` commitish support.
* Added `git-graft` dest branch default of _master_.
* Added `git-setup`.
* Added `git-graft`.
* Added `git-undo` for removing recent commits.
* Fixed `git-delete-branch`: Don't fail if the local branch doesn't exist.
* Fixed __PREFIX__ to respect env vars.
* Fixed shift in `git-count`.

0.0.3 / 2010-08-27
==================

* Added `git-extras-version`
* Added `git-update-extras`
* Fixed `git-contrib` issue when the username is in a commit msg
* Fixed; delete remote tag only if local was deleted [Aggelos Orfanakos]
* Fixed; delete remote branch only if local was deleted [Aggelos Orfanakos]
* Fixed printing of authors for git-summary's on Ubuntu [jason young]
* Fixed; read doesn't have the -e option in SH on my machine at least. [Nick Campbell]
* Added `git-extras-version`.
* Added `git-update-extras`.
* Fixed `git-contrib` issue when the username is in a commit msg.
* Fixed: delete remote tag only if local was deleted.
* Fixed: delete remote branch only if local was deleted.
* Fixed printing of authors for git-summary's on Ubuntu.
* Fixed: read doesn't have the -e option in SH on my machine at least.

0.0.2 / 2010-08-24
==================

* Added `git-summary`
* Added `git-commits-since`
* Added `git-repl`
* Added `git-delete-tag`
* Added `git-delete-branch`
* Added `git-contrib`
* Fixed handling off spaces in contributor's name for `git-contrib` [Domenico Rotiroti]
* Fixed spaces in `git-release` names/numbers [Domenico Rotiroti]
* Fixed readme
* Added `git-summary`.
* Added `git-commits-since`.
* Added `git-repl`.
* Added `git-delete-tag`.
* Added `git-delete-branch`.
* Added `git-contrib`.
* Fixed handling off spaces in contributor's name for `git-contrib`.
* Fixed spaces in `git-release` names/numbers.
* Fixed readme.

0.0.1 / 2010-08-05
==================

* Docs for git-ignore. Closes #3
* Merge branch 'ignore'
* Added git-ignore
* Readme typo
* Fixed <tag> in docs
* Install docs
* Merge branch 'release'
* Added git-release
* Fixed readme
* Readme
* Passing args to git shortlog
* Added --all support to git-count
* Initial commit
* Docs for `git-ignore`. Closes #3.
* Merge branch 'ignore'.
* Added `git-ignore`.
* Readme typo.
* Fixed <tag> in docs.
* Install docs.
* Merge branch 'release'.
* Added `git-release`.
* Fixed readme.
* Readme.
* Passing args to git shortlog.
* Added --all support to git-count.
* Initial commit.
92 changes: 61 additions & 31 deletions Readme.md
Expand Up @@ -25,11 +25,13 @@ Brew (buggy):
- git commits-since
- git pull-request
- git count
- git create-branch
- git delete-branch
- git delete-submodule
- git delete-tag
- git fresh-branch
- git graft
- git alias
- git ignore
- git release
- git contrib
Expand Down Expand Up @@ -99,28 +101,28 @@ Outputs a repo summary:

$ git summary

project: express
commits: 1893
files : 111
authors:
1285 visionmedia
478 Tj Holowaychuk
48 Aaron Heckmann
34 csausdev
26 ciaranj
project: express
commits: 1893
files : 111
authors:
1285 visionmedia
478 Tj Holowaychuk
48 Aaron Heckmann
34 csausdev
26 ciaranj
6 Guillermo Rauch
3 Nick Poulden
2 Brian McKinney
2 Benny Wong
1 Justin Lilly
1 James Herdman
1 Adam Sanderson
1 Viktor Kelemen
1 Gregory Ritter
1 Greg Ritter
1 ewoudj
1 isaacs
1 Matt Colyer
3 Nick Poulden
2 Brian McKinney
2 Benny Wong
1 Justin Lilly
1 James Herdman
1 Adam Sanderson
1 Viktor Kelemen
1 Gregory Ritter
1 Greg Ritter
1 ewoudj
1 isaacs
1 Matt Colyer

This command can also take a commitish, and will print a summary for the range
of commits included in the commitish:
Expand All @@ -132,7 +134,7 @@ of commits included in the commitish:
GIT read-eval-print-loop:

$ git repl

git> ls-files
History.md
Makefile
Expand All @@ -143,7 +145,7 @@ of commits included in the commitish:
bin/git-delete-tag
bin/git-ignore
bin/git-release

git> quit

## git-commits-since [date]
Expand Down Expand Up @@ -197,15 +199,37 @@ of commits included in the commitish:
## git-release

Release commit with the given &lt;tag&gt;.

$ git release 0.1.0

Does the following:

- Commits changes (to changelog etc) with message "Release &lt;tag&gt;"
- Tags with the given &lt;tag&gt;
- Pushes the branch / tags

## git-alias

Define, search and show aliases.

Defining a new alias:

$ git alias last "cat-file commit HEAD"

Providing only one argument, `git-alias` searchs for aliases matching the given value:

$ git alias ^la
last = cat-file commit HEAD

`git-alias` will show all aliases if no argument is given:

$ git alias
s = status
amend = commit --amend
rank = shortlog -sn --no-merges
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
whois = !sh -c 'git log -i -1 --pretty="format:%an <%ae>

## git-ignore

To lazy to open up _.gitignore_? me too! simply pass some patterns:
Expand All @@ -219,7 +243,13 @@ of commits included in the commitish:
$ git ignore
build
*.o
*.log
*.log

## git-create-branch &lt;name&gt;

Creates local and remote branch _name_.

$ git create-branch development

Adding patterns from an existing template:
$ git ignore -t rails
Expand Down Expand Up @@ -261,10 +291,10 @@ of commits included in the commitish:
since the previous tag or since the project began when no tags are present. Opens the changelog in **$EDITOR** when set.

$ git changelog && cat History.md
n.n.n / 2010-08-05

n.n.n / 2010-08-05
==================

* Docs for git-ignore. Closes #3
* Merge branch 'ignore'
* Added git-ignore
Expand All @@ -275,9 +305,9 @@ since the previous tag or since the project began when no tags are present. Open
* Passing args to git shortlog
* Added --all support to git-count
* Initial commit

Listing commits:

$ git changelog --list

* Docs for git-ignore. Closes #3
Expand Down
7 changes: 7 additions & 0 deletions bin/git-alias
@@ -0,0 +1,7 @@
#!/bin/sh

case $# in
0) git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort ;;
1) git alias | grep -e "$1" ;;
*) git config --global "alias.$1" "$2" ;;
esac
15 changes: 7 additions & 8 deletions bin/git-contrib
@@ -1,10 +1,9 @@
#!/bin/sh

user="$1"
if test -z "$user"; then
echo "user name required." && exit 1
else
count=`git log --oneline --pretty="format: %an" | grep "$user" | wc -l`
test $count -eq 0 && echo "$user did not contribute." && exit 1
git shortlog | grep "$user (" -A $count
fi
user="$*"

test -z "$user" && echo "user name required." && exit 1

count=`git log --oneline --pretty="format: %an" | grep "$user" | wc -l`
test $count -eq 0 && echo "$user did not contribute." && exit 1
git shortlog | grep "$user (" -A $count
9 changes: 9 additions & 0 deletions bin/git-create-branch
@@ -0,0 +1,9 @@
#!/bin/sh

branch=$1
test -z $branch && echo "branch required." && exit 1

git push origin origin:refs/heads/$branch
git fetch origin
git checkout --track -b $branch origin/$branch
git pull
7 changes: 4 additions & 3 deletions bin/git-delete-branch
@@ -1,5 +1,6 @@
#!/bin/sh

test -z $1 && echo "branch required." && exit 1
git branch -D $1
git branch -d -r origin/$1 && git push origin :$1
branch=$1
test -z $branch && echo "branch required." && exit 1
git branch -D $branch
git branch -d -r origin/$branch && git push origin :$branch
6 changes: 4 additions & 2 deletions bin/git-delete-submodule
@@ -1,9 +1,11 @@
#!/bin/sh

test -z $1 && echo "submodule required" && exit 1
submodule=$1

test -z $submodule && echo "submodule required" && exit 1
test ! -f .gitmodules && echo ".gitmodules file not found" && exit 2

NAME=$(echo $1 | sed 's/\/$//g')
NAME=$(echo $submodule | sed 's/\/$//g')
test -z $(git config --file=.gitmodules submodule.$NAME.url) && echo "submodule not found" && exit 3

git config --remove-section submodule.$NAME
Expand Down
5 changes: 3 additions & 2 deletions bin/git-delete-tag
@@ -1,4 +1,5 @@
#!/bin/sh

test -z $1 && echo "tag required." && exit 1
git tag -d $1 && git push origin :refs/tags/$1
tagname=$1
test -z $tagname && echo "tag required." && exit 1
git tag -d $tagname && git push origin :refs/tags/$tagname
9 changes: 6 additions & 3 deletions bin/git-fresh-branch
@@ -1,6 +1,9 @@
#!/bin/sh

test -z $1 && echo "branch required." && exit 1
git symbolic-ref HEAD refs/heads/$1
branch=$1

test -z $branch && echo "branch required." && exit 1

git symbolic-ref HEAD refs/heads/$branch
rm .git/index
git clean -fdx
git clean -fdx

0 comments on commit 11ee5ed

Please sign in to comment.