1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-CREATE\-BRANCH" "1" "November 2020" "" "Git Extras"
.
.SH "NAME"
\fBgit\-create\-branch\fR \- Create branches
.
.SH "SYNOPSIS"
\fBgit\-create\-branch\fR [\-r|\-\-remote [remote_name]] <branchname>
.
.SH "DESCRIPTION"
Creates local branch named <branchname> and optionally sets up a remote tracking branch\.
.
.SH "OPTIONS"
<\-r|\-\-remote [remote_name]>
.
.P
Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\.
.
.P
<\-\-from [start_point]>
.
.P
Setup a start point when the branch created\. If \fB\-\-from\fR is not supplied, use the current branch by default\.
.
.P
<branchname>
.
.P
The name of the branch to create\.
.
.SH "PREFERENCES"
You may save your default preference for the \fBremote\fR option above by using \fBgit config\fR with the key \fBgit\-extras\.create\-branch\.remote\fR whose value will be the default remote when \fB[\-r|\-\-remote]\fR is not specified\.
.
.IP "" 4
.
.nf
$ git config git\-extras\.create\-branch\.remote lucinda
.
.fi
.
.IP "" 0
.
.P
The command line option \fB\-r|\-\-remote\fR will override this preference\.
.
.SH "EXAMPLES"
With no remote preference set:
.
.IP "" 4
.
.nf
# creates local branch \'integration\'
$ git create\-branch integration
# creates local & remote branch \'integration\' (on default \'origin\')
$ git create\-branch \-r integration
# creates local & remote branch \'integration\' on \'upstream\'
$ git create\-branch \-r upstream integration
.
.fi
.
.IP "" 0
.
.P
With \fBgit\-extras\.create\-branch\.remote\fR preference set to \'lucinda\':
.
.IP "" 4
.
.nf
# creates local & remote branch \'integration\' (on preference \'lucinda\')
$ git create\-branch integration
# overriding preference, using default `\-r` of \'origin\'
# creates local & remote branch \'integration\' on default \'origin\'
$ git create\-branch \-r integration
# overriding preference, using specified `\-r` of \'upstream\'
# creates local & remote branch \'integration\' on \'upstream\'
$ git create\-branch \-r upstream integration
.
.fi
.
.IP "" 0
.
.SH "NOTES"
.
.IP "\(bu" 4
As of 4\.4\.0, the default behavior has changed\. \fBgit\-create\-branch\fR will no longer automatically setup a remote tracking branch unless the \fB\-r|\-remote\fR option is specified\. See additional note on preference feature in 4\.8\.0\-dev below\.
.
.IP "\(bu" 4
As of 4\.8\.0\-dev, the \fBremote\fR option can be set via \fBgit config\fR preference as described in \fIPreferences\fR section\.
.
.IP "" 0
.
.SH "AUTHOR"
Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR> Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR>, Brian Murrell <\fIbtmurrell@gmail\.com\fR>\.
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/tj/git\-extras\fR>
|