-
Notifications
You must be signed in to change notification settings - Fork 0
Hub avec git
kokarez edited this page Sep 14, 2012
·
1 revision
$ curl http://defunkt.io/hub/standalone -sLo ~/bin/hub && chmod +x ~/bin/hub
Commands (from hub)
$ hub cherry-pick http://github.com/mislav/REPO/commit/SHA
> hub remote add -f mislav git://github.com/mislav/REPO.git
> hub cherry-pick SHA
$ hub cherry-pick mislav@SHA
> hub remote add -f mislav git://github.com/mislav/CURRENT_REPO.git
> hub cherry-pick SHA
$ hub cherry-pick mislav@SHA
> hub fetch mislav
> hub cherry-pick SHA
$ hub am https://github.com/defunkt/hub/pull/55
> curl https://github.com/defunkt/hub/pull/55.patch -o /tmp/55.patch
> hub am /tmp/55.patch
$ hub am --ignore-whitespace https://github.com/davidbalbert/hub/commit/fdb9921
> curl https://github.com/davidbalbert/hub/commit/fdb9921.patch -o /tmp/fdb9921.patch
> hub am --ignore-whitespace /tmp/fdb9921.patch
$ hub apply https://gist.github.com/8da7fb575debd88c54cf
> curl https://gist.github.com/8da7fb575debd88c54cf.txt -o /tmp/gist-8da7fb575debd88c54cf.txt
> hub apply /tmp/gist-8da7fb575debd88c54cf.txt
$ hub fork
[ repo forked on GitHub ]
> hub remote add -f YOUR_USER git@github.com:YOUR_USER/CURRENT_REPO.git
# while on a topic branch called "feature":
$ hub pull-request
[ opens text editor to edit title & body for the request ]
[ opened pull request on GitHub for "YOUR_USER:feature" ]
# explicit title, pull base & head:
$ hub pull-request "I've implemented feature X" -b defunkt:master -h mislav:feature
$ git pull-request -i 123
[ attached pull request to issue #123 ]
$ hub browse
> open https://github.com/YOUR_USER/CURRENT_REPO
$ hub browse -- commit/SHA
> open https://github.com/YOUR_USER/CURRENT_REPO/commit/SHA
$ hub browse -- issues
> open https://github.com/YOUR_USER/CURRENT_REPO/issues
$ hub browse schacon/ticgit
> open https://github.com/schacon/ticgit
$ hub browse schacon/ticgit commit/SHA
> open https://github.com/schacon/ticgit/commit/SHA
$ hub browse resque
> open https://github.com/YOUR_USER/resque
$ hub browse resque network
> open https://github.com/YOUR_USER/resque/network