hub 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hub might be problematic. Click here for more details.
- data/README.md +94 -60
- data/Rakefile +74 -38
- data/lib/hub/args.rb +16 -3
- data/lib/hub/commands.rb +340 -101
- data/lib/hub/context.rb +270 -112
- data/lib/hub/runner.rb +4 -2
- data/lib/hub/standalone.rb +13 -7
- data/lib/hub/version.rb +1 -1
- data/man/hub.1 +162 -80
- data/man/hub.1.html +163 -96
- data/man/hub.1.ronn +84 -167
- data/test/alias_test.rb +0 -1
- data/test/helper.rb +8 -8
- data/test/hub_test.rb +395 -71
- data/test/standalone_test.rb +0 -1
- metadata +8 -6
data/lib/hub/runner.rb
CHANGED
@@ -31,7 +31,7 @@ module Hub
|
|
31
31
|
args.commands.map do |cmd|
|
32
32
|
if cmd.respond_to?(:join)
|
33
33
|
# a simplified `Shellwords.join` but it's OK since this is only used to inspect
|
34
|
-
cmd.map { |
|
34
|
+
cmd.map { |arg| arg = arg.to_s; (arg.index(' ') || arg.empty?) ? "'#{arg}'" : arg }.join(' ')
|
35
35
|
else
|
36
36
|
cmd.to_s
|
37
37
|
end
|
@@ -45,7 +45,9 @@ module Hub
|
|
45
45
|
# allows commands to print an error message and cancel their own
|
46
46
|
# execution if they don't make sense.
|
47
47
|
def execute
|
48
|
-
|
48
|
+
if args.noop?
|
49
|
+
puts commands
|
50
|
+
elsif not args.skip?
|
49
51
|
if args.chained?
|
50
52
|
execute_command_chain
|
51
53
|
else
|
data/lib/hub/standalone.rb
CHANGED
@@ -2,14 +2,20 @@ module Hub
|
|
2
2
|
module Standalone
|
3
3
|
extend self
|
4
4
|
|
5
|
+
RUBY_BIN = if File.executable? '/usr/bin/ruby' then '/usr/bin/ruby'
|
6
|
+
else
|
7
|
+
require 'rbconfig'
|
8
|
+
File.join RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']
|
9
|
+
end
|
10
|
+
|
5
11
|
PREAMBLE = <<-preamble
|
6
|
-
|
12
|
+
#!#{RUBY_BIN}
|
7
13
|
#
|
8
14
|
# This file, hub, is generated code.
|
9
15
|
# Please DO NOT EDIT or send patches for it.
|
10
16
|
#
|
11
17
|
# Please take a look at the source from
|
12
|
-
#
|
18
|
+
# https://github.com/defunkt/hub
|
13
19
|
# and submit patches against the individual files
|
14
20
|
# that build hub.
|
15
21
|
#
|
@@ -34,13 +40,13 @@ preamble
|
|
34
40
|
standalone = ''
|
35
41
|
standalone << PREAMBLE
|
36
42
|
|
37
|
-
Dir["#{root}/*.rb"].
|
38
|
-
|
39
|
-
|
43
|
+
files = Dir["#{root}/*.rb"].sort - [__FILE__]
|
44
|
+
# ensure context.rb appears before others
|
45
|
+
ctx = files.find {|f| f['context.rb'] } and files.unshift(files.delete(ctx))
|
40
46
|
|
47
|
+
files.each do |file|
|
41
48
|
File.readlines(file).each do |line|
|
42
|
-
|
43
|
-
standalone << line
|
49
|
+
standalone << line if line !~ /^\s*#/
|
44
50
|
end
|
45
51
|
end
|
46
52
|
|
data/lib/hub/version.rb
CHANGED
data/man/hub.1
CHANGED
@@ -1,24 +1,21 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "HUB" "1" "
|
4
|
+
.TH "HUB" "1" "November 2011" "DEFUNKT" "Git Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBhub\fR \- git + hub = github
|
8
8
|
.
|
9
9
|
.SH "SYNOPSIS"
|
10
|
-
\fBhub\fR \fICOMMAND\fR \fIOPTIONS\fR
|
10
|
+
\fBhub\fR [\fB\-\-noop\fR] \fICOMMAND\fR \fIOPTIONS\fR
|
11
11
|
.
|
12
12
|
.br
|
13
13
|
\fBhub alias\fR [\fB\-s\fR] \fISHELL\fR
|
14
14
|
.
|
15
|
-
.
|
15
|
+
.SS "Expanded git commands:"
|
16
16
|
\fBgit init \-g\fR \fIOPTIONS\fR
|
17
17
|
.
|
18
18
|
.br
|
19
|
-
\fBgit create\fR [\fB\-p\fR] [\fB\-d <DESCRIPTION>\fR] [\fB\-h <HOMEPAGE>\fR]
|
20
|
-
.
|
21
|
-
.br
|
22
19
|
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
23
20
|
.
|
24
21
|
.br
|
@@ -31,93 +28,124 @@
|
|
31
28
|
\fBgit fetch\fR \fIUSER\-1\fR,[\fIUSER\-2\fR,\.\.\.]
|
32
29
|
.
|
33
30
|
.br
|
31
|
+
\fBgit checkout\fR \fIPULLREQ\-URL\fR [\fIBRANCH\fR]
|
32
|
+
.
|
33
|
+
.br
|
34
34
|
\fBgit cherry\-pick\fR \fIGITHUB\-REF\fR
|
35
35
|
.
|
36
36
|
.br
|
37
37
|
\fBgit am\fR \fIGITHUB\-URL\fR
|
38
38
|
.
|
39
39
|
.br
|
40
|
+
\fBgit apply\fR \fIGITHUB\-URL\fR
|
41
|
+
.
|
42
|
+
.br
|
40
43
|
\fBgit push\fR \fIREMOTE\-1\fR,\fIREMOTE\-2\fR,\.\.\.,\fIREMOTE\-N\fR [\fIREF\fR]
|
41
44
|
.
|
42
45
|
.br
|
46
|
+
\fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
47
|
+
.
|
48
|
+
.SS "Custom git commands:"
|
49
|
+
\fBgit create\fR [\fINAME\fR] [\fB\-p\fR] [\fB\-d\fR \fIDESCRIPTION\fR] [\fB\-h\fR \fIHOMEPAGE\fR]
|
50
|
+
.
|
51
|
+
.br
|
43
52
|
\fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]
|
44
53
|
.
|
45
54
|
.br
|
46
55
|
\fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR
|
47
56
|
.
|
48
57
|
.br
|
49
|
-
\fBgit
|
58
|
+
\fBgit fork\fR [\fB\-\-no\-remote\fR]
|
50
59
|
.
|
51
60
|
.br
|
52
|
-
\fBgit
|
61
|
+
\fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]:
|
53
62
|
.
|
54
63
|
.SH "DESCRIPTION"
|
55
|
-
|
64
|
+
hub enhances various git commands to ease most common workflows with GitHub\.
|
56
65
|
.
|
57
|
-
.
|
58
|
-
\fBhub
|
66
|
+
.TP
|
67
|
+
\fBhub \-\-noop\fR \fICOMMAND\fR
|
68
|
+
Shows which command(s) would be run as a result of the current command\. Doesn\'t perform anything\.
|
69
|
+
.
|
70
|
+
.TP
|
71
|
+
\fBhub alias\fR [\fB\-s\fR] \fISHELL\fR
|
72
|
+
Writes shell aliasing code for \fISHELL\fR (\fBbash\fR, \fBsh\fR, \fBzsh\fR, \fBcsh\fR) to standard output\. With the \fB\-s\fR option, the output of this command can be evaluated directly within the shell:
|
59
73
|
.
|
60
74
|
.br
|
61
75
|
\fBeval $(hub alias \-s bash)\fR
|
62
76
|
.
|
63
|
-
.
|
64
|
-
\fBgit init\fR \fB\-g\fR \fIOPTIONS\fR
|
77
|
+
.TP
|
78
|
+
\fBgit init\fR \fB\-g\fR \fIOPTIONS\fR
|
79
|
+
Create a git repository as with git\-init(1) and add remote \fBorigin\fR at "git@github\.com:\fIUSER\fR/\fIREPOSITORY\fR\.git"; \fIUSER\fR is your GitHub username and \fIREPOSITORY\fR is the current working directory\'s basename\.
|
65
80
|
.
|
66
|
-
.
|
67
|
-
\fBgit
|
81
|
+
.TP
|
82
|
+
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
83
|
+
Clone repository "git://github\.com/\fIUSER\fR/\fIREPOSITORY\fR\.git" into \fIDIRECTORY\fR as with git\-clone(1)\. When \fIUSER\fR/ is omitted, assumes your GitHub login\. With \fB\-p\fR, clone private repositories over SSH\. For repositories under your GitHub login, \fB\-p\fR is implicit\.
|
68
84
|
.
|
69
|
-
.
|
70
|
-
|
71
|
-
|
72
|
-
.IP "\(bu" 4
|
73
|
-
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR \fIDIRECTORY\fR:
|
85
|
+
.TP
|
86
|
+
\fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[\fB/\fR\fIREPOSITORY\fR]
|
87
|
+
Add remote "git://github\.com/\fIUSER\fR/\fIREPOSITORY\fR\.git" as with git\-remote(1)\. When /\fIREPOSITORY\fR is omitted, the basename of the current working directory is used\. With \fB\-p\fR, use private remote "git@github\.com:\fIUSER\fR/\fIREPOSITORY\fR\.git"\. If \fIUSER\fR is "origin" then uses your GitHub login\.
|
74
88
|
.
|
75
|
-
.
|
76
|
-
|
89
|
+
.TP
|
90
|
+
\fBgit remote set\-url\fR [\fB\-p\fR] \fIOPTIONS\fR \fIREMOTE\-NAME\fR \fIUSER\fR[/\fIREPOSITORY\fR]
|
91
|
+
Sets the url of remote \fIREMOTE\-NAME\fR using the same rules as \fBgit remote add\fR\.
|
77
92
|
.
|
78
|
-
.
|
79
|
-
\fBgit
|
93
|
+
.TP
|
94
|
+
\fBgit fetch\fR \fIUSER\-1\fR,[\fIUSER\-2\fR,\.\.\.]
|
95
|
+
Adds missing remote(s) with \fBgit remote add\fR prior to fetching\. New remotes are only added if they correspond to valid forks on GitHub\.
|
80
96
|
.
|
81
|
-
.
|
82
|
-
|
97
|
+
.TP
|
98
|
+
\fBgit checkout\fR \fIPULLREQ\-URL\fR [\fIBRANCH\fR]
|
99
|
+
Checks out the head of the pull request as a local branch, to allow for reviewing, rebasing and otherwise cleaning up the commits in the pull request before merging\. The name of the local branch can explicitly be set with \fIBRANCH\fR\.
|
83
100
|
.
|
84
|
-
.
|
85
|
-
\fBgit
|
101
|
+
.TP
|
102
|
+
\fBgit cherry\-pick\fR \fIGITHUB\-REF\fR
|
103
|
+
Cherry\-pick a commit from a fork using either full URL to the commit or GitHub\-flavored Markdown notation, which is \fBuser@sha\fR\. If the remote doesn\'t yet exist, it will be added\. A \fBgit fetch <user>\fR is issued prior to the cherry\-pick attempt\.
|
86
104
|
.
|
87
|
-
.
|
88
|
-
|
105
|
+
.TP
|
106
|
+
\fBgit [am|apply]\fR \fIGITHUB\-URL\fR
|
107
|
+
Downloads the patch file for the pull request or commit at the URL and applies that patch from disk with \fBgit am\fR or \fBgit apply\fR\. Similar to \fBcherry\-pick\fR, but doesn\'t add new remotes\. \fBgit am\fR creates commits while preserving authorship info while \fBapply\fR only applies the patch to the working copy\.
|
89
108
|
.
|
90
|
-
.
|
91
|
-
\fBgit
|
109
|
+
.TP
|
110
|
+
\fBgit push\fR \fIREMOTE\-1\fR,\fIREMOTE\-2\fR,\.\.\.,\fIREMOTE\-N\fR [\fIREF\fR]
|
111
|
+
Push \fIREF\fR to each of \fIREMOTE\-1\fR through \fIREMOTE\-N\fR by executing multiple \fBgit push\fR commands\.
|
92
112
|
.
|
93
|
-
.
|
94
|
-
\fBgit
|
113
|
+
.TP
|
114
|
+
\fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
115
|
+
Submodule repository "git://github\.com/\fIUSER\fR/\fIREPOSITORY\fR\.git" into \fIDIRECTORY\fR as with git\-submodule(1)\. When \fIUSER\fR/ is omitted, assumes your GitHub login\. With \fB\-p\fR, use private remote "git@github\.com:\fIUSER\fR/\fIREPOSITORY\fR\.git"\.
|
95
116
|
.
|
96
|
-
.
|
97
|
-
\fBgit
|
117
|
+
.TP
|
118
|
+
\fBgit help\fR
|
119
|
+
Display enhanced git\-help(1)\.
|
98
120
|
.
|
99
|
-
.
|
100
|
-
|
121
|
+
.P
|
122
|
+
hub also adds some custom commands that are otherwise not present in git:
|
101
123
|
.
|
102
|
-
.
|
103
|
-
\fBgit
|
124
|
+
.TP
|
125
|
+
\fBgit create\fR [\fINAME\fR] [\fB\-p\fR] [\fB\-d\fR \fIDESCRIPTION\fR] [\fB\-h\fR \fIHOMEPAGE\fR]
|
126
|
+
Create a new public GitHub repository from the current git repository and add remote \fBorigin\fR at "git@github\.com:\fIUSER\fR/\fIREPOSITORY\fR\.git"; \fIUSER\fR is your GitHub username and \fIREPOSITORY\fR is the current working directory name\. To explicitly name the new repository, pass in \fINAME\fR, optionally in \fIORGANIZATION\fR/\fINAME\fR form to create under an organization you\'re a member of\. With \fB\-p\fR, create a private repository, and with \fB\-d\fR and \fB\-h\fR set the repository\'s description and homepage URL, respectively\.
|
104
127
|
.
|
105
|
-
.
|
106
|
-
\fBgit
|
128
|
+
.TP
|
129
|
+
\fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]
|
130
|
+
Open repository\'s GitHub page in the system\'s default web browser using \fBopen(1)\fR or the \fBBROWSER\fR env variable\. If the repository isn\'t specified, \fBbrowse\fR opens the page of the repository found in the current directory\. If SUBPAGE is specified, the browser will open on the specified subpage: one of "wiki", "commits", "issues" or other (the default is "tree")\.
|
107
131
|
.
|
108
|
-
.
|
109
|
-
\fBgit
|
132
|
+
.TP
|
133
|
+
\fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR
|
134
|
+
Open a GitHub compare view page in the system\'s default web browser\. \fISTART\fR to \fIEND\fR are branch names, tag names, or commit SHA1s specifying the range of history to compare\. If a range with two dots (\fBa\.\.b\fR) is given, it will be transformed into one with three dots\. If \fISTART\fR is omitted, GitHub will compare against the base branch (the default is "master")\.
|
110
135
|
.
|
111
|
-
.
|
112
|
-
|
136
|
+
.TP
|
137
|
+
\fBgit fork\fR [\fB\-\-no\-remote\fR]
|
138
|
+
Forks the original project (referenced by "origin" remote) on GitHub and adds a new remote for it under your username\. Requires \fBgithub\.token\fR to be set (see CONFIGURATION)\.
|
113
139
|
.
|
114
|
-
.
|
115
|
-
\fBgit
|
140
|
+
.TP
|
141
|
+
\fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
|
142
|
+
\fBgit pull\-request\fR [\fB\-f\fR] \fIISSUE\-URL\fR [\fB\-h\fR \fIHEAD\fR] Opens a pull request on GitHub for the project that the "origin" remote points to\. The default head of the pull request is the current branch\. Both base and head of the pull request can be explicitly given in one of the following formats: "branch", "owner:branch", "owner/repo:branch"\. This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote\. To skip this check, use \fB\-f\fR\.
|
116
143
|
.
|
117
|
-
.IP
|
118
|
-
|
144
|
+
.IP
|
145
|
+
If \fITITLE\fR is omitted, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message\.
|
119
146
|
.
|
120
|
-
.IP
|
147
|
+
.IP
|
148
|
+
If instead of normal \fITITLE\fR an issue number is given with \fB\-i\fR, the pull request will be attached to an existing GitHub issue\. Alternatively, instead of title you can paste a full URL to an issue on GitHub\.
|
121
149
|
.
|
122
150
|
.SH "CONFIGURATION"
|
123
151
|
Use git\-config(1) to display the currently configured GitHub username:
|
@@ -147,32 +175,24 @@ $ git config \-\-global github\.token <token>
|
|
147
175
|
.IP "" 0
|
148
176
|
.
|
149
177
|
.P
|
150
|
-
|
178
|
+
You can override these values with \fIGITHUB_USER\fR and \fIGITHUB_TOKEN\fR environment variables\.
|
179
|
+
.
|
180
|
+
.P
|
181
|
+
See \fIhttp://help\.github\.com/set\-your\-user\-name\-email\-and\-github\-token/\fR for more information\.
|
151
182
|
.
|
152
183
|
.P
|
153
|
-
|
184
|
+
If you prefer the HTTPS protocol for GitHub repositories, you can set "hub\.protocol" to "https"\. This will affect \fBclone\fR, \fBfork\fR, \fBremote add\fR and other operations that expand references to GitHub repositories as full URLs that otherwise use git and ssh protocols\.
|
154
185
|
.
|
155
186
|
.IP "" 4
|
156
187
|
.
|
157
188
|
.nf
|
158
189
|
|
159
|
-
$ git config \-\-global
|
190
|
+
$ git config \-\-global hub\.protocol https
|
160
191
|
.
|
161
192
|
.fi
|
162
193
|
.
|
163
194
|
.IP "" 0
|
164
195
|
.
|
165
|
-
.P
|
166
|
-
Want to use environment variables instead of a local gitconfig for authentication?
|
167
|
-
.
|
168
|
-
.IP "\(bu" 4
|
169
|
-
\fBGITHUB_USER\fR \- If set, this will be used instead of the \fBgithub\.user\fR config
|
170
|
-
.
|
171
|
-
.IP "\(bu" 4
|
172
|
-
\fBGITHUB_TOKEN\fR \- If set, this will be used instead of the \fBgithub\.token\fR
|
173
|
-
.
|
174
|
-
.IP "" 0
|
175
|
-
.
|
176
196
|
.SH "EXAMPLES"
|
177
197
|
.
|
178
198
|
.SS "git clone"
|
@@ -186,10 +206,7 @@ $ git clone \-p schacon/ticgit
|
|
186
206
|
> git clone git@github\.com:schacon/ticgit\.git
|
187
207
|
|
188
208
|
$ git clone resque
|
189
|
-
> git clone git
|
190
|
-
|
191
|
-
$ git clone \-p resque
|
192
|
-
> git clone git@github\.com:YOUR_USER/resque\.git
|
209
|
+
> git clone git@github\.com/YOUR_USER/resque\.git
|
193
210
|
.
|
194
211
|
.fi
|
195
212
|
.
|
@@ -241,7 +258,7 @@ $ git cherry\-pick mislav@SHA
|
|
241
258
|
.
|
242
259
|
.fi
|
243
260
|
.
|
244
|
-
.SS "git am"
|
261
|
+
.SS "git am, git apply"
|
245
262
|
.
|
246
263
|
.nf
|
247
264
|
|
@@ -252,6 +269,10 @@ $ git am https://github\.com/defunkt/hub/pull/55
|
|
252
269
|
$ git am \-\-ignore\-whitespace https://github\.com/davidbalbert/hub/commit/fdb9921
|
253
270
|
> curl https://github\.com/davidbalbert/hub/commit/fdb9921\.patch \-o /tmp/fdb9921\.patch
|
254
271
|
> git am \-\-ignore\-whitespace /tmp/fdb9921\.patch
|
272
|
+
|
273
|
+
$ git apply https://gist\.github\.com/8da7fb575debd88c54cf
|
274
|
+
> curl https://gist\.github\.com/8da7fb575debd88c54cf\.txt \-o /tmp/gist\-8da7fb575debd88c54cf\.txt
|
275
|
+
> git apply /tmp/gist\-8da7fb575debd88c54cf\.txt
|
255
276
|
.
|
256
277
|
.fi
|
257
278
|
.
|
@@ -260,18 +281,37 @@ $ git am \-\-ignore\-whitespace https://github\.com/davidbalbert/hub/commit/fdb9
|
|
260
281
|
.nf
|
261
282
|
|
262
283
|
$ git fork
|
263
|
-
|
264
|
-
> git remote add YOUR_USER git@github\.com:YOUR_USER/CURRENT_REPO\.git
|
284
|
+
[ repo forked on GitHub ]
|
285
|
+
> git remote add \-f YOUR_USER git@github\.com:YOUR_USER/CURRENT_REPO\.git
|
265
286
|
.
|
266
287
|
.fi
|
267
288
|
.
|
268
|
-
.SS "git
|
289
|
+
.SS "git pull\-request"
|
269
290
|
.
|
270
291
|
.nf
|
271
292
|
|
272
|
-
|
273
|
-
|
274
|
-
|
293
|
+
# while on a topic branch called "feature":
|
294
|
+
$ git pull\-request
|
295
|
+
[ opens text editor to edit title & body for the request ]
|
296
|
+
[ opened pull request on GitHub for "YOUR_USER:feature" ]
|
297
|
+
|
298
|
+
# explicit title, pull base & head:
|
299
|
+
$ git pull\-request "I\'ve implemented feature X" \-b defunkt:master \-h mislav:feature
|
300
|
+
|
301
|
+
$ git pull\-request \-i 123
|
302
|
+
[ attached pull request to issue #123 ]
|
303
|
+
.
|
304
|
+
.fi
|
305
|
+
.
|
306
|
+
.SS "git checkout"
|
307
|
+
.
|
308
|
+
.nf
|
309
|
+
|
310
|
+
# $ git checkout https://github\.com/defunkt/hub/pull/73
|
311
|
+
# > git remote add \-f \-t feature git://github:com/mislav/hub\.git
|
312
|
+
# > git checkout \-b mislav\-feature mislav/feature
|
313
|
+
|
314
|
+
# $ git checkout https://github\.com/defunkt/hub/pull/73 custom\-branch\-name
|
275
315
|
.
|
276
316
|
.fi
|
277
317
|
.
|
@@ -280,8 +320,29 @@ $ git init \-g
|
|
280
320
|
.nf
|
281
321
|
|
282
322
|
$ git create
|
283
|
-
|
323
|
+
[ repo created on GitHub ]
|
284
324
|
> git remote add origin git@github\.com:YOUR_USER/CURRENT_REPO\.git
|
325
|
+
|
326
|
+
# with description:
|
327
|
+
$ git create \-d \'It shall be mine, all mine!\'
|
328
|
+
|
329
|
+
$ git create recipes
|
330
|
+
[ repo created on GitHub ]
|
331
|
+
> git remote add origin git@github\.com:YOUR_USER/recipes\.git
|
332
|
+
|
333
|
+
$ git create sinatra/recipes
|
334
|
+
[ repo created in GitHub organization ]
|
335
|
+
> git remote add origin git@github\.com:sinatra/recipes\.git
|
336
|
+
.
|
337
|
+
.fi
|
338
|
+
.
|
339
|
+
.SS "git init"
|
340
|
+
.
|
341
|
+
.nf
|
342
|
+
|
343
|
+
$ git init \-g
|
344
|
+
> git init
|
345
|
+
> git remote add origin git@github\.com:YOUR_USER/REPO\.git
|
285
346
|
.
|
286
347
|
.fi
|
287
348
|
.
|
@@ -303,12 +364,18 @@ $ git push origin,staging,qa bert_timeout
|
|
303
364
|
$ git browse
|
304
365
|
> open https://github\.com/YOUR_USER/CURRENT_REPO
|
305
366
|
|
367
|
+
$ git browse \-\- commit/SHA
|
368
|
+
> open https://github\.com/YOUR_USER/CURRENT_REPO/commit/SHA
|
369
|
+
|
306
370
|
$ git browse \-\- issues
|
307
371
|
> open https://github\.com/YOUR_USER/CURRENT_REPO/issues
|
308
372
|
|
309
373
|
$ git browse schacon/ticgit
|
310
374
|
> open https://github\.com/schacon/ticgit
|
311
375
|
|
376
|
+
$ git browse schacon/ticgit commit/SHA
|
377
|
+
> open https://github\.com/schacon/ticgit/commit/SHA
|
378
|
+
|
312
379
|
$ git browse resque
|
313
380
|
> open https://github\.com/YOUR_USER/resque
|
314
381
|
|
@@ -324,7 +391,7 @@ $ git browse resque network
|
|
324
391
|
$ git compare refactor
|
325
392
|
> open https://github\.com/CURRENT_REPO/compare/refactor
|
326
393
|
|
327
|
-
$ git compare 1\.0
|
394
|
+
$ git compare 1\.0\.\.1\.1
|
328
395
|
> open https://github\.com/CURRENT_REPO/compare/1\.0\.\.\.1\.1
|
329
396
|
|
330
397
|
$ git compare \-u fix
|
@@ -335,6 +402,21 @@ $ git compare other\-user patch
|
|
335
402
|
.
|
336
403
|
.fi
|
337
404
|
.
|
405
|
+
.SS "git submodule"
|
406
|
+
.
|
407
|
+
.nf
|
408
|
+
|
409
|
+
$ hub submodule add wycats/bundler vendor/bundler
|
410
|
+
> git submodule add git://github\.com/wycats/bundler\.git vendor/bundler
|
411
|
+
|
412
|
+
$ hub submodule add \-p wycats/bundler vendor/bundler
|
413
|
+
> git submodule add git@github\.com:wycats/bundler\.git vendor/bundler
|
414
|
+
|
415
|
+
$ hub submodule add \-b ryppl ryppl/pip vendor/pip
|
416
|
+
> git submodule add \-b ryppl git://github\.com/ryppl/pip\.git vendor/pip
|
417
|
+
.
|
418
|
+
.fi
|
419
|
+
.
|
338
420
|
.SS "git help"
|
339
421
|
.
|
340
422
|
.nf
|
@@ -347,10 +429,10 @@ $ git help hub
|
|
347
429
|
.fi
|
348
430
|
.
|
349
431
|
.SH "BUGS"
|
350
|
-
\
|
432
|
+
\fIhttps://github\.com/defunkt/hub/issues\fR
|
351
433
|
.
|
352
434
|
.SH "AUTHORS"
|
353
435
|
\fIhttps://github\.com/defunkt/hub/contributors\fR
|
354
436
|
.
|
355
437
|
.SH "SEE ALSO"
|
356
|
-
git(1), git\-clone(1), git\-remote(1), git\-init(1), \fIhttp://github\.com\fR, \
|
438
|
+
git(1), git\-clone(1), git\-remote(1), git\-init(1), \fIhttp://github\.com\fR, \fIhttps://github\.com/defunkt/hub\fR
|