show help message;
$ gh help
Import a repository to github:
$ gh import
Show repository info:
$ cd App
$ gh info
commit process:
% gh commit
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Changes
# modified: Makefile.PL
# modified: README.mkd
#
no changes added to commit (use "git add" and/or "git commit -a")
Show Diff(d), Status(s), Commit(c), Quit(q) :___
get github recent activities.
$ gh recent
list all repository of c9s:
$ gh list c9s
if you want text wrapped:
$ WRAP=1 gh list c9s
clone Plack repository from miyagawa:
$ gh clone miyagawa/Plack # default: read-only
or:
$ gh clone miyagawa Plack
$ gh clone foo Social --http
$ gh clone foo Social --https
$ gh clone clkao Web-Hippie --ro
clone from read-only uri:
$ gh clone miyagawa/Plack --ro
clone from ssh uri:
$ gh clone miyagawa/Plack --ssh
search repository:
$ gh search Plack
to clone all repository of miyagawa:
$ gh all miyagawa
$ gh all facebook --into facebook
$ gh all perl6 --into perl6-stuff
$ gh all perl6 --into perl6-stuff --prompt
$ gh all perl6 --into perl6-stuff --verbose --prompt
$ gh all clkao --ro # read-only
to fork project:
$ gh fork clkao AnyMQ
to fork current project:
$ cd clkao/AnyMQ
$ gh fork
to show fork network:
$ cd App-gh/
$ gh network
c9s/App-gh - watchers(4) forks(1)
foo/App-gh - watchers(1) forks(0)
Pull command behavior
- Add remote for a fork
- Fetch remote
- Merge from fork branch if --merge option is specified.
- Create a branch if --branch is specified.
First , switch path to your repository:
$ cd App-gh/
Show up the network by running pull command with no arguments:
$ gh pull
....
To pull from foo and add remote:
$ gh pull foo
$ git log foo/master # to show changes
To pull from foo and merge changes:
$ gh pull foo -m
To merge foo/feature1 to local/master
$ gh pull foo feature1 -m
To merge changes from foo/master and create a tracked branch:
$ gh pull foo --merge --branch
$ gh pull foo -m -b
Run (pull/push) repository changes from/to remotes, and git remote update --prune
$ gh update
"a" => "all"
"u" => "update"
"pu" => "pull"
"f" => "fork"
"n" => "network"
"s" => "search"
To install this module, run the following commands:
# Makefile.PL needs this
cpan Module::Install::AuthorTests
perl Makefile.PL
make
make test
make install
$ mkdir ~/.zsh/functions
$ cp completion/zsh/_gh ~/.zsh/functions
add ~/.zsh/functions to your fpath
$ vim ~/.zshrc
fpath=(~/.zsh/functions/ $fpath)
please keep the dependency simple and less.
After installing, you can find documentation for this module with the perldoc command.
perldoc App::gh
You can also look for information at:
RT, CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-gh
AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/App-gh
CPAN Ratings
http://cpanratings.perl.org/d/App-gh
Search CPAN
http://search.cpan.org/dist/App-gh/
Copyright (C) 2010 Cornelius
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.