Skip to content

Commit

Permalink
documentation for git-alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jweslley committed Mar 16, 2011
1 parent f3fb2dd commit ae511e0
Show file tree
Hide file tree
Showing 4 changed files with 335 additions and 31 deletions.
85 changes: 54 additions & 31 deletions Readme.md
Expand Up @@ -29,6 +29,7 @@ Brew (buggy):
- git delete-tag
- git fresh-branch
- git graft
- git alias
- git ignore
- git release
- git contrib
Expand Down Expand Up @@ -57,28 +58,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 @@ -90,7 +91,7 @@ of commits included in the commitish:
GIT read-eval-print-loop:

$ git repl

git> ls-files
History.md
Makefile
Expand All @@ -101,7 +102,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 @@ -155,15 +156,37 @@ of commits included in the commitish:
## git-release

Release commit with the given <tag>.

$ git release 0.1.0

Does the following:

- Commits changes (to changelog etc) with message "Release <tag>"
- Tags with the given <tag>
- 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 @@ -177,7 +200,7 @@ of commits included in the commitish:
$ git ignore
build
*.o
*.log
*.log

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

Expand Down Expand Up @@ -222,10 +245,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 @@ -236,9 +259,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
84 changes: 84 additions & 0 deletions man/git-alias.1
@@ -0,0 +1,84 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-ALIAS" "1" "March 2011" "" "Git Extras"
.
.SH "NAME"
\fBgit\-alias\fR \- Define, search and show aliases
.
.SH "SYNOPSIS"
\fBgit\-alias\fR [<alias\-name> <command>]|[<search\-term>]
.
.SH "DESCRIPTION"
.
.SH "OPTIONS"
<alias\-name>
.
.P
The name of the alias to create\.
.
.P
<command>
.
.P
The command for which you are creating an alias\.
.
.P
<search\-term>
.
.P
The pattern used for search aliases\.
.
.SH "EXAMPLES"
Defining a new alias:
.
.IP "" 4
.
.nf

$ git alias last "cat\-file commit HEAD"
.
.fi
.
.IP "" 0
.
.P
Providing only one argument, \fBgit\-alias\fR searchs for aliases matching the given value:
.
.IP "" 4
.
.nf

$ git alias ^la
last = cat\-file commit HEAD
.
.fi
.
.IP "" 0
.
.P
\fBgit\-alias\fR will show all aliases if no argument is given:
.
.IP "" 4
.
.nf

$ 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>
.
.fi
.
.IP "" 0
.
.SH "AUTHOR"
Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR>
.
.SH "REPORTING BUGS"
<\fIhttp://github\.com/visionmedia/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttp://github\.com/visionmedia/git\-extras\fR>
141 changes: 141 additions & 0 deletions man/git-alias.1.html

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

0 comments on commit ae511e0

Please sign in to comment.