1GIT-CREATE-BRANCH(1)              Git Extras              GIT-CREATE-BRANCH(1)
2
3
4

NAME

6       git-create-branch - Create branches
7

SYNOPSIS

9       git-create-branch [-r|--remote [remote_name]] <branchname>
10

DESCRIPTION

12       Creates local branch named <branchname> and optionally sets up a remote
13       tracking branch.
14

OPTIONS

16       <-r|--remote [remote_name]>
17
18       Setup a remote tracking branch using remote_name. If remote_name is not
19       supplied, use origin by default.
20
21       <--from [start_point]>
22
23       Setup a start point when the branch created. If --from is not supplied,
24       use the current branch by default.
25
26       <branchname>
27
28       The name of the branch to create.
29

PREFERENCES

31       You may save your default preference for the  remote  option  above  by
32       using  git  config  with  the key git-extras.create-branch.remote whose
33       value will be the default remote when [-r|--remote] is not specified.
34
35
36
37           $ git config git-extras.create-branch.remote lucinda
38
39
40
41       The command line option -r|--remote will override this preference.
42

EXAMPLES

44       With no remote preference set:
45
46
47
48           # creates local branch ´integration´
49           $ git create-branch integration
50
51           # creates local & remote branch ´integration´ (on default ´origin´)
52           $ git create-branch -r integration
53
54           # creates local & remote branch ´integration´ on ´upstream´
55           $ git create-branch -r upstream integration
56
57
58
59       With git-extras.create-branch.remote preference set to ´lucinda´:
60
61
62
63           # creates local & remote branch ´integration´ (on preference ´lucinda´)
64           $ git create-branch integration
65
66           # overriding preference, using default `-r` of ´origin´
67           # creates local & remote branch ´integration´ on default ´origin´
68           $ git create-branch -r integration
69
70           # overriding preference, using specified `-r` of ´upstream´
71           # creates local & remote branch ´integration´ on ´upstream´
72           $ git create-branch -r upstream integration
73
74
75

NOTES

77       ·   As of 4.4.0, the default behavior  has  changed.  git-create-branch
78           will  no longer automatically setup a remote tracking branch unless
79           the -r|-remote option is specified. See additional note on  prefer‐
80           ence feature in 4.8.0-dev below.
81
82       ·   As  of 4.8.0-dev, the remote option can be set via git config pref‐
83           erence as described in Preferences section.
84
85
86

AUTHOR

88       Written by Jonhnny Weslley  <jw@jonhnnyweslley.net>  Modified  by  Mark
89       Pitman <mark.pitman@gmail.com>, Brian Murrell <btmurrell@gmail.com>.
90

REPORTING BUGS

92       <https://github.com/tj/git-extras/issues>
93

SEE ALSO

95       <https://github.com/tj/git-extras>
96
97
98
99                                 November 2020            GIT-CREATE-BRANCH(1)
Impressum