Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 188 lines (119 sloc) 4.473 kb
e0980a6 Chris Wanstrath make the readme less of a liar
defunkt authored
1 hub: git + hub = github
2 =======================
187144a Chris Wanstrath readme
defunkt authored
3
871faf9 Chris Wanstrath rake and readme updates
defunkt authored
4 `hub` is a command line utility which adds GitHub knowledge to `git`.
187144a Chris Wanstrath readme
defunkt authored
5
871faf9 Chris Wanstrath rake and readme updates
defunkt authored
6 It can used on its own or as a `git` wrapper.
187144a Chris Wanstrath readme
defunkt authored
7
fa0889c Chris Wanstrath standalone bundler
defunkt authored
8 Normal:
e3ece88 Chris Wanstrath more readme
defunkt authored
9
10 $ hub clone rtomayko/tilt
11 Initialized empty Git repository in /Users/chris/sandbox/tilt/.git/
12 remote: Counting objects: 307, done.
13 remote: Compressing objects: 100% (219/219), done.
14 remote: Total 307 (delta 175), reused 85 (delta 45)
15 Receiving objects: 100% (307/307), 48.91 KiB, done.
16 Resolving deltas: 100% (175/175), done.
17
871faf9 Chris Wanstrath rake and readme updates
defunkt authored
18 Wrapping `git`:
e3ece88 Chris Wanstrath more readme
defunkt authored
19
20 $ git clone rack/rack
21 Initialized empty Git repository in /Users/chris/sandbox/rack/.git/
22 remote: Counting objects: 4005, done.
23 remote: Compressing objects: 100% (1738/1738), done.
24 remote: Total 4005 (delta 2505), reused 3620 (delta 2208)
25 Receiving objects: 100% (4005/4005), 785.82 KiB | 129 KiB/s, done.
26 Resolving deltas: 100% (2505/2505), done.
27
4a34b84 Caio Chassot README: Replace mentions of "path" with "$PATH"
kch authored
28 hub requires you have `git` installed and in your `$PATH`. It also
f238f21 Chris Wanstrath consistency
defunkt authored
29 requires Ruby 1.8.6+ or Ruby 1.9.1+. No other libraries necessary.
65041dc Chris Wanstrath tweaks
defunkt authored
30
187144a Chris Wanstrath readme
defunkt authored
31
e0980a6 Chris Wanstrath make the readme less of a liar
defunkt authored
32 Install
187144a Chris Wanstrath readme
defunkt authored
33 -------
34
5010d55 Chris Wanstrath readme tweaks
defunkt authored
35 ### Standalone
36
65041dc Chris Wanstrath tweaks
defunkt authored
37 `hub` is most easily installed as a standalone script:
fa0889c Chris Wanstrath standalone bundler
defunkt authored
38
a431e9d Caio Chassot README: fix standalone install line
kch authored
39 curl -s http://defunkt.github.com/hub/standalone > ~/bin/hub && chmod 755 !#:4
fa0889c Chris Wanstrath standalone bundler
defunkt authored
40
4a34b84 Caio Chassot README: Replace mentions of "path" with "$PATH"
kch authored
41 Assuming `~/bin/` is in your `$PATH`, you're ready to roll:
5010d55 Chris Wanstrath readme tweaks
defunkt authored
42
871faf9 Chris Wanstrath rake and readme updates
defunkt authored
43 $ hub version
44 git version 1.6.4.2
45 hub version 0.1.0
5010d55 Chris Wanstrath readme tweaks
defunkt authored
46
c497ac6 Caio Chassot README: fix capitalization of Rubygems (to RubyGems)
kch authored
47 ### RubyGems
2390eb2 Chris Wanstrath gemcutter
defunkt authored
48
c497ac6 Caio Chassot README: fix capitalization of Rubygems (to RubyGems)
kch authored
49 Though not recommended, `hub` can also be installed as a RubyGem:
2390eb2 Chris Wanstrath gemcutter
defunkt authored
50
51 $ gem install git-hub -s http://gemcutter.org/
52
53 (Yes, the gem name is `git-hub`.)
54
5010d55 Chris Wanstrath readme tweaks
defunkt authored
55 ### Source
56
92f7592 Chris Wanstrath hub install => hub alias
defunkt authored
57 You can also install from source:
187144a Chris Wanstrath readme
defunkt authored
58
59 $ git clone git://github.com/defunkt/hub.git
60 $ cd hub
871faf9 Chris Wanstrath rake and readme updates
defunkt authored
61 $ rake standalone
62 $ cp hub /usr/local/bin/
187144a Chris Wanstrath readme
defunkt authored
63
64
5010d55 Chris Wanstrath readme tweaks
defunkt authored
65 Aliasing
66 --------
187144a Chris Wanstrath readme
defunkt authored
67
3dd4764 Chris Wanstrath more readme
defunkt authored
68 hub works best when it wraps `git`. This is not dangerous - your
69 normal git commands should all work. hub merely adds some sugar.
187144a Chris Wanstrath readme
defunkt authored
70
3dd4764 Chris Wanstrath more readme
defunkt authored
71 Typing `hub alias <shell>` will display alias instructions for
72 your shell. `hub alias` alone will show the known shells.
187144a Chris Wanstrath readme
defunkt authored
73
3dd4764 Chris Wanstrath more readme
defunkt authored
74 For example:
75
76 $ hub alias bash
77 Run this in your shell to start using `hub` as `git`:
78 alias git=hub
79
80 You should place this command in your `.bash_profile` or other startup
272a9ef Chris Wanstrath lookin' good
defunkt authored
81 script to ensure runs on login.
3dd4764 Chris Wanstrath more readme
defunkt authored
82
83 The alias command can also be eval'd directly using the `-s` flag:
84
85 $ eval `hub alias -s bash`
3f5679b Chris Wanstrath tweaks
defunkt authored
86
187144a Chris Wanstrath readme
defunkt authored
87
f2719eb Chris Wanstrath readme love
defunkt authored
88 Commands
187144a Chris Wanstrath readme
defunkt authored
89 --------
90
3dd4764 Chris Wanstrath more readme
defunkt authored
91 Assuming you've aliased `hub` to `git` the following commands now have
5010d55 Chris Wanstrath readme tweaks
defunkt authored
92 superpowers:
93
187144a Chris Wanstrath readme
defunkt authored
94 ### git clone
95
96 $ git clone schacon/ticgit
c67a9c4 Chris Wanstrath tweak readme
defunkt authored
97 > git clone git://github.com/schacon/ticgit.git
98
187144a Chris Wanstrath readme
defunkt authored
99 $ git clone -p schacon/ticgit
c67a9c4 Chris Wanstrath tweak readme
defunkt authored
100 > git clone git@github.com:schacon/ticgit.git
187144a Chris Wanstrath readme
defunkt authored
101
a0fc034 Chris Wanstrath add `git clone blah` which will use your github login to clone your repo
defunkt authored
102 $ git clone resque
103 > git clone git://github.com/YOUR_USER/resque.git
104
105 $ git clone -p resque
106 > git clone git@github.com:YOUR_USER/resque.git
107
187144a Chris Wanstrath readme
defunkt authored
108 ### git remote add
109
110 $ git remote add rtomayko
c67a9c4 Chris Wanstrath tweak readme
defunkt authored
111 > git remote add rtomayko git://github.com/rtomayko/CURRENT_REPO.git
112
3c6b476 Konstantin Haase README fix
rkh authored
113 $ git remote add -p rtomayko
c67a9c4 Chris Wanstrath tweak readme
defunkt authored
114 > git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
187144a Chris Wanstrath readme
defunkt authored
115
116 ### git init
117
e0980a6 Chris Wanstrath make the readme less of a liar
defunkt authored
118 $ git init -g
c67a9c4 Chris Wanstrath tweak readme
defunkt authored
119 > git init
a0fc034 Chris Wanstrath add `git clone blah` which will use your github login to clone your repo
defunkt authored
120 > git remote add origin git@github.com:YOUR_USER/REPO.git
c67a9c4 Chris Wanstrath tweak readme
defunkt authored
121
122 ### git help
123
124 $ git help
125 > (improved git help)
e015b87 Chris Wanstrath mention git help hub
defunkt authored
126 $ git help hub
127 > (hub man page)
187144a Chris Wanstrath readme
defunkt authored
128
129
5010d55 Chris Wanstrath readme tweaks
defunkt authored
130 GitHub Login
131 ------------
132
133 To get the most out of `hub`, you'll want to ensure your GitHub login
134 is stored locally in your Git config.
135
136 To test it run this:
137
138 $ git config --global github.user
139
140 If you see nothing, you need to set the config setting:
141
f238f21 Chris Wanstrath consistency
defunkt authored
142 $ git config --global github.user YOUR_USER
5010d55 Chris Wanstrath readme tweaks
defunkt authored
143
144 See <http://github.com/guides/local-github-config> for more information.
145
146
f2719eb Chris Wanstrath readme love
defunkt authored
147 Prior Art
187144a Chris Wanstrath readme
defunkt authored
148 ---------
149
150 These projects also aim to either improve git or make interacting with
151 GitHub simpler:
152
153 * [eg](http://www.gnome.org/~newren/eg/)
154 * [github-gem](http://github.com/defunkt/github-gem)
155 * [gh](http://github.com/visionmedia/gh)
156
157
f2719eb Chris Wanstrath readme love
defunkt authored
158 Contributing
159 ------------
160
161 Once you've made your great commits:
162
163 1. [Fork][0] hub
164 2. Create a topic branch - `git checkout -b my_branch`
165 3. Push to your branch - `git push origin my_branch`
166 4. Create an [Issue][1] with a link to your branch
167 5. That's it!
168
169
e0980a6 Chris Wanstrath make the readme less of a liar
defunkt authored
170 Meta
171 ----
187144a Chris Wanstrath readme
defunkt authored
172
f2719eb Chris Wanstrath readme love
defunkt authored
173 * Code: `git clone git://github.com/defunkt/hub.git`
174 * Home: <http://github.com/defunkt/hub>
175 * Bugs: <http://github.com/defunkt/hub/issues>
176 * List: <http://groups.google.com/group/github>
f8d612c Chris Wanstrath fix urls
defunkt authored
177 * Test: <http://runcoderun.com/defunkt/hub>
178 * Gems: <http://gemcutter.org/gems/git-hub>
f2719eb Chris Wanstrath readme love
defunkt authored
179
180
181 Author
182 ------
183
184 Chris Wanstrath :: chris@ozmm.org :: @defunkt
185
186 [0]: http://help.github.com/forking/
187 [1]: http://github.com/defunkt/hub/issues
Something went wrong with that request. Please try again.