hub.1 2.6 KB
Newer Older
1
.\" generated with Ron/v0.3
R
Ryan Tomayko 已提交
2 3
.\" http://github.com/rtomayko/ron/
.
4
.TH "HUB" "1" "December 2009" "DEFUNKT" "Git Manual"
R
Ryan Tomayko 已提交
5 6 7 8 9
.
.SH "NAME"
\fBhub\fR \-\- git + hub = github
.
.SH "SYNOPSIS"
10
\fBhub\fR \fICOMMAND\fR \fIOPTIONS\fR
R
Ryan Tomayko 已提交
11 12
.
.br
13
\fBhub alias\fR [\fB\-s\fR] \fISHELL\fR
R
Ryan Tomayko 已提交
14 15
.
.P
16
\fBgit init \-g\fR \fIOPTIONS\fR
R
Ryan Tomayko 已提交
17 18
.
.br
19
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[/\fIREPOSITORY\fR] \fIDIRECTORY\fR
R
Ryan Tomayko 已提交
20 21
.
.br
22
\fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[/\fIREPOSITORY\fR]
R
Ryan Tomayko 已提交
23 24 25 26 27 28
.
.SH "DESCRIPTION"
\fBhub\fR enhances various \fBgit\fR commands with GitHub remote expansion. The
alias command displays information on configuring your environment:
.
.TP
29
\fBhub alias\fR [\fB\-s\fR] \fISHELL\fR 
C
Chris Wanstrath 已提交
30 31
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: \fBeval $(hub alias \-s bash)\fR 
R
Ryan Tomayko 已提交
32 33 34 35 36
.
.P
After configuring the alias, the following commands have superpowers:
.
.TP
37
\fBgit init\fR \fB\-g\fR \fIOPTIONS\fR 
R
Ryan Tomayko 已提交
38
Create a git repository as with git\-init(1) and add remote \fBorigin\fR at
39
"git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git"; \fIUSER\fR is your GitHub username and \fIREPOSITORY\fR is the current working directory's basename.
R
Ryan Tomayko 已提交
40 41
.
.TP
42 43
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[\fB/\fR\fIREPOSITORY\fR] \fIDIRECTORY\fR 
Clone repository "git://github.com/\fIUSER\fR/\fIREPOSITORY\fR.git" into \fIDIRECTORY\fR as with git\-clone(1). When /\fIREPOSITORY\fR is omitted, the
R
Ryan Tomayko 已提交
44
basename of the current working directory is used. With \fB\-p\fR, use private
45
remote "git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git".
R
Ryan Tomayko 已提交
46 47
.
.TP
C
Chris Wanstrath 已提交
48
\fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[\fB/\fR\fIREPOSITORY\fR]
49 50
Add remote "git://github.com/\fIUSER\fR/\fIREPOSITORY\fR.git" as with
git\-remote(1). When /\fIREPOSITORY\fR is omitted, the basename of the
R
Ryan Tomayko 已提交
51
current working directory is used. With \fB\-p\fR, use private remote
52
"git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git".
R
Ryan Tomayko 已提交
53 54 55 56 57 58 59 60
.
.TP
\fBgit help\fR
Display enhanced git\-help(1).
.
.SH "CONFIGURATION"
Use git\-config(1) to display the currently configured GitHub username:
.
61 62
.IP "" 4
.
R
Ryan Tomayko 已提交
63
.nf
64

R
Ryan Tomayko 已提交
65 66 67 68
$ git config \-\-global github.user 
.
.fi
.
69 70
.IP "" 0
.
R
Ryan Tomayko 已提交
71 72 73
.P
Or, set the GitHub username with:
.
74 75
.IP "" 4
.
R
Ryan Tomayko 已提交
76
.nf
77

R
Ryan Tomayko 已提交
78 79 80 81
$ git config \-\-global github.user <username> 
.
.fi
.
82 83
.IP "" 0
.
R
Ryan Tomayko 已提交
84 85 86 87 88 89 90 91 92 93
.P
See \fIhttp://github.com/guides/local\-github\-config\fR for more information.
.
.SH "BUGS"
\fIhttp://github.com/defunkt/hub/issues\fR
.
.SH "AUTHOR"
Chris Wanstrath :: chris@ozmm.org :: @defunkt
.
.SH "SEE ALSO"
94
git(1), git\-clone(1), git\-remote(1), git\-init(1),\fIhttp://github.com\fR, \fIhttp://github.com/defunkt/hub\fR