README.md 2.3 KB
Newer Older
C
Chris Wanstrath 已提交
1 2
hub: git + hub = github
=======================
C
readme  
Chris Wanstrath 已提交
3

C
Chris Wanstrath 已提交
4 5
`hub` is a command line utility which injects `git` with GitHub
knowledge.
C
readme  
Chris Wanstrath 已提交
6

C
Chris Wanstrath 已提交
7 8
It can used on its own or can serve as a complete, backwards
compatible replacement for the `git` script.
C
readme  
Chris Wanstrath 已提交
9 10


C
Chris Wanstrath 已提交
11
Install
C
readme  
Chris Wanstrath 已提交
12 13
-------

C
Chris Wanstrath 已提交
14
hub can be installed using rubygems:
C
readme  
Chris Wanstrath 已提交
15

C
Chris Wanstrath 已提交
16
    $ gem install hub -s http://gemcutter.org/
C
readme  
Chris Wanstrath 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

Or installed from source:

    $ git clone git://github.com/defunkt/hub.git
    $ cd hub
    $ rake install

Once you've installed `hub`, you can invoke it directly from the
command line:

    $ hub --version

To get the full experience, alias your `git` command to run `hub` by
placing the following in your `.bash_profile` (or relevant startup
script):

    alias git=hub

Typing `hub install <shell>` will display install instructions for you
shell.


C
Chris Wanstrath 已提交
39
Commands
C
readme  
Chris Wanstrath 已提交
40 41 42 43 44
--------

### git clone

    $ git clone schacon/ticgit
C
Chris Wanstrath 已提交
45 46
    > git clone git://github.com/schacon/ticgit.git

C
readme  
Chris Wanstrath 已提交
47
    $ git clone -p schacon/ticgit
C
Chris Wanstrath 已提交
48
    > git clone git@github.com:schacon/ticgit.git
C
readme  
Chris Wanstrath 已提交
49 50 51 52

### git remote add

    $ git remote add rtomayko
C
Chris Wanstrath 已提交
53 54
    > git remote add rtomayko git://github.com/rtomayko/CURRENT_REPO.git

C
readme  
Chris Wanstrath 已提交
55
    $ git remote add -p pjhyett
C
Chris Wanstrath 已提交
56
    > git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
C
readme  
Chris Wanstrath 已提交
57 58 59

### git init

C
Chris Wanstrath 已提交
60
    $ git init -g
C
Chris Wanstrath 已提交
61 62 63 64 65 66 67
    > git init
    > git remote add origin git@github.com:USER/REPO.git

### git help

    $ git help
    > (improved git help)
C
readme  
Chris Wanstrath 已提交
68 69


C
Chris Wanstrath 已提交
70
Prior Art
C
readme  
Chris Wanstrath 已提交
71 72 73 74 75 76 77 78 79 80
---------

These projects also aim to either improve git or make interacting with
GitHub simpler:

* [eg](http://www.gnome.org/~newren/eg/)
* [github-gem](http://github.com/defunkt/github-gem)
* [gh](http://github.com/visionmedia/gh)


C
Chris Wanstrath 已提交
81 82 83 84 85 86 87 88 89 90 91 92
Contributing
------------

Once you've made your great commits:

1. [Fork][0] hub
2. Create a topic branch - `git checkout -b my_branch`
3. Push to your branch - `git push origin my_branch`
4. Create an [Issue][1] with a link to your branch
5. That's it!


C
Chris Wanstrath 已提交
93 94
Meta
----
C
readme  
Chris Wanstrath 已提交
95

C
Chris Wanstrath 已提交
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
* Code: `git clone git://github.com/defunkt/hub.git`
* Home: <http://github.com/defunkt/hub>
* Docs: <http://defunkt.github.com/hub/>
* Bugs: <http://github.com/defunkt/hub/issues>
* List: <http://groups.google.com/group/github>
* Gems: <http://gemcutter.org/gems/hub>


Author
------

Chris Wanstrath :: chris@ozmm.org :: @defunkt

[0]: http://help.github.com/forking/
[1]: http://github.com/defunkt/hub/issues