提交 21ab7c78 编写于 作者: M Mislav Marohnić

Merge pull request #1077 from kbrock/rename_gh

rename gh command to hub in docs
......@@ -41,7 +41,7 @@ func init() {
}
/*
$ gh apply https://github.com/jingweno/gh/pull/55
$ hub apply https://github.com/jingweno/gh/pull/55
> curl https://github.com/jingweno/gh/pull/55.patch -o /tmp/55.patch
> git apply /tmp/55.patch
......
......@@ -33,19 +33,19 @@ func init() {
}
/*
$ gh browse
$ hub browse
> open https://github.com/CURRENT_REPO
$ gh browse -- issues
$ hub browse -- issues
> open https://github.com/CURRENT_REPO/issues
$ gh browse jingweno/gh
$ hub browse jingweno/gh
> open https://github.com/jingweno/gh
$ gh browse gh
$ hub browse gh
> open https://github.com/YOUR_LOGIN/gh
$ gh browse gh wiki
$ hub browse gh wiki
> open https://github.com/YOUR_LOGIN/gh/wiki
*/
func browse(command *Command, args *Args) {
......
......@@ -25,11 +25,11 @@ func init() {
}
/**
$ gh checkout https://github.com/jingweno/gh/pull/73
$ hub checkout https://github.com/jingweno/gh/pull/73
> git remote add -f --no-tags -t feature git://github:com/foo/gh.git
> git checkout --track -B foo-feature foo/feature
$ gh checkout https://github.com/jingweno/gh/pull/73 custom-branch-name
$ hub checkout https://github.com/jingweno/gh/pull/73 custom-branch-name
**/
func checkout(command *Command, args *Args) {
if !args.IsParamsEmpty() {
......
......@@ -24,15 +24,15 @@ func init() {
}
/*
$ gh cherry-pick https://github.com/jingweno/gh/commit/a319d88#comments
$ hub cherry-pick https://github.com/jingweno/gh/commit/a319d88#comments
> git remote add -f --no-tags jingweno git://github.com/jingweno/gh.git
> git cherry-pick a319d88
$ gh cherry-pick jingweno@a319d88
$ hub cherry-pick jingweno@a319d88
> git remote add -f --no-tags jingweno git://github.com/jingweno/gh.git
> git cherry-pick a319d88
$ gh cherry-pick jingweno@SHA
$ hub cherry-pick jingweno@SHA
> git fetch jingweno
> git cherry-pick SHA
*/
......
......@@ -31,16 +31,16 @@ func init() {
}
/*
$ gh ci-status
$ hub ci-status
> (prints CI state of HEAD and exits with appropriate code)
$ gh ci-status -v
$ hub ci-status -v
> (prints CI states and URLs to CI build results for HEAD and exits with appropriate code)
$ gh ci-status BRANCH
$ hub ci-status BRANCH
> (prints CI state of BRANCH and exits with appropriate code)
$ gh ci-status SHA
$ hub ci-status SHA
> (prints CI state of SHA and exits with appropriate code)
*/
func ciStatus(cmd *Command, args *Args) {
......
......@@ -25,19 +25,19 @@ func init() {
}
/**
$ gh clone jingweno/gh
$ hub clone jingweno/gh
> git clone git://github.com/jingweno/gh.git
$ gh clone -p jingweno/gh
$ hub clone -p jingweno/gh
> git clone git@github.com:jingweno/gh.git
$ gh clone jekyll_and_hyde
$ hub clone jekyll_and_hyde
> git clone git://github.com/YOUR_LOGIN/jekyll_and_hyde.git
$ gh clone -p jekyll_and_hyde
$ hub clone -p jekyll_and_hyde
> git clone git@github.com:YOUR_LOGIN/jekyll_and_hyde.git
$ gh clone jekyll_and_hyde jekyll
$ hub clone jekyll_and_hyde jekyll
> git clone git://github.com/YOUR_LOGIN/jekyll_and_hyde.git jekyll
*/
func clone(command *Command, args *Args) {
......
......@@ -37,13 +37,13 @@ func init() {
}
/*
$ gh compare refactor
$ hub compare refactor
> open https://github.com/CURRENT_REPO/compare/refactor
$ gh compare 1.0..1.1
$ hub compare 1.0..1.1
> open https://github.com/CURRENT_REPO/compare/1.0...1.1
$ gh compare -u other-user patch
$ hub compare -u other-user patch
> open https://github.com/other-user/REPO/compare/patch
*/
func compare(command *Command, args *Args) {
......
......@@ -39,18 +39,18 @@ func init() {
}
/*
$ gh create
$ hub create
... create repo on github ...
> git remote add -f origin git@github.com:YOUR_USER/CURRENT_REPO.git
# with description:
$ gh create -d 'It shall be mine, all mine!'
$ hub create -d 'It shall be mine, all mine!'
$ gh create recipes
$ hub create recipes
[ repo created on GitHub ]
> git remote add origin git@github.com:YOUR_USER/recipes.git
$ gh create sinatra/recipes
$ hub create sinatra/recipes
[ repo created in GitHub organization ]
> git remote add origin git@github.com:sinatra/recipes.git
*/
......
......@@ -23,7 +23,7 @@ func init() {
}
/*
$ gh fetch jingweno
$ hub fetch jingweno
> git remote add jingweno git://github.com/jingweno/REPO.git
> git fetch jingweno
......
......@@ -26,11 +26,11 @@ func init() {
}
/*
$ gh fork
$ hub fork
[ repo forked on GitHub ]
> git remote add -f YOUR_USER git@github.com:YOUR_USER/CURRENT_REPO.git
$ gh fork --no-remote
$ hub fork --no-remote
[ repo forked on GitHub ]
*/
func fork(cmd *Command, args *Args) {
......
......@@ -25,7 +25,7 @@ func init() {
}
/*
$ gh init -g
$ hub init -g
> git init
> git remote add origin git@github.com:USER/REPO.git
*/
......
......@@ -46,7 +46,7 @@ func init() {
}
/*
$ gh issue
$ hub issue
*/
func issue(cmd *Command, args *Args) {
runInLocalRepo(func(localRepo *github.GitHubRepo, project *github.Project, gh *github.Client) {
......
......@@ -23,7 +23,7 @@ func init() {
}
/*
$ gh merge https://github.com/jingweno/gh/pull/73
$ hub merge https://github.com/jingweno/gh/pull/73
> git fetch git://github.com/jingweno/gh.git +refs/heads/feature:refs/remotes/jingweno/feature
> git merge jingweno/feature --no-ff -m 'Merge pull request #73 from jingweno/feature...'
*/
......
......@@ -66,23 +66,23 @@ func init() {
/*
# while on a topic branch called "feature":
$ gh pull-request
$ hub pull-request
[ opens text editor to edit title & body for the request ]
[ opened pull request on GitHub for "YOUR_USER:feature" ]
# explicit pull base & head:
$ gh pull-request -b jingweno:master -h jingweno:feature
$ hub pull-request -b jingweno:master -h jingweno:feature
$ gh pull-request -m "title\n\nbody"
$ hub pull-request -m "title\n\nbody"
[ create pull request with title & body ]
$ gh pull-request -i 123
$ hub pull-request -i 123
[ attached pull request to issue #123 ]
$ gh pull-request https://github.com/jingweno/gh/pull/123
$ hub pull-request https://github.com/jingweno/gh/pull/123
[ attached pull request to issue #123 ]
$ gh pull-request -F FILE
$ hub pull-request -F FILE
[ create pull request with title & body from FILE ]
*/
func pullRequest(cmd *Command, args *Args) {
......
......@@ -21,12 +21,12 @@ func init() {
}
/*
$ gh push origin,staging,qa bert_timeout
$ hub push origin,staging,qa bert_timeout
> git push origin bert_timeout
> git push staging bert_timeout
> git push qa bert_timeout
$ gh push origin
$ hub push origin
> git push origin HEAD
*/
func push(command *Command, args *Args) {
......
......@@ -27,13 +27,13 @@ func init() {
}
/*
$ gh remote add jingweno
$ hub remote add jingweno
> git remote add jingweno git://github.com/jingweno/THIS_REPO.git
$ gh remote add -p jingweno
$ hub remote add -p jingweno
> git remote add jingweno git@github.com:jingweno/THIS_REPO.git
$ gh remote add origin
$ hub remote add origin
> git remote add origin git://github.com/YOUR_LOGIN/THIS_REPO.git
*/
func remote(command *Command, args *Args) {
......
......@@ -16,13 +16,13 @@ func init() {
}
/**
$ gh submodule add jingweno/gh vendor/gh
$ hub submodule add jingweno/gh vendor/gh
> git submodule add git://github.com/jingweno/gh.git vendor/gh
$ gh submodule add -p jingweno/gh vendor/gh
$ hub submodule add -p jingweno/gh vendor/gh
> git submodule add git@github.com:jingweno/gh.git vendor/gh
$ gh submodule add -b gh --name gh jingweno/gh vendor/gh
$ hub submodule add -b gh --name gh jingweno/gh vendor/gh
> git submodule add -b gh --name gh git://github.com/jingweno/gh.git vendor/gh
**/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册