GIT-CREATE-BRANCH(1)
πΈ NAME πΈ
git-create-branch β bestie, we are making branches π
β¨ SYNOPSIS β¨
okay so the original page literally does not give you a synopsis line here. it's giving mysterious. iconic of it, honestly π β the flags get explained down in OPTIONS anyway.
π DESCRIPTION π
It creates a local branch named <branchname>, and optionally sets up a remote tracking branch too. that's the whole vibe. two-for-one if you ask nicely π«Ά
π OPTIONS π
- remote tracking setup β Set up a remote tracking branch using remote_name. If remote_name is not supplied,
originis used by default. (yes bestie,origin, the default one, no cap) --from[start_point] β Setup a start point when the branch is created. If--fromis not supplied, the current branch is used by default. so it's like, "start me from here," and if you don't say where, it's wherever you're standing rn π<branchname>β The name of the branch to create. duh, but fr fr, you do have to give it one π
π PREFERENCES π
You can save your own default for the remote option up there by using git config, with the key git-extras.create-branch.remote β whatever value you give it becomes the default remote whenever [-r|--remote] isn't specified. set it and forget it, queen π
$ git config git-extras.create-branch.remote lucinda
and when you do pass the command line option -r|--remote, that overrides the preference. the CLI stays undefeated β¨
π¦ EXAMPLES π¦
With no remote preference set:
# 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
With the git-extras.create-branch.remote preference set to 'lucinda':
# 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
β NOTES β
- As of 4.4.0, the default behavior has changed.
git-create-branchwill no longer automatically setup a remote tracking branch unless the-r|-remoteoption is specified. See the additional note on the preference feature in 4.8.0-dev below. β οΈ so if you're on autopilot expecting a remote branch, bestie, she's not coming unless you ask. - As of 4.8.0-dev, the remote option can be set via
git configpreference, as described in the Preferences section. π
π AUTHOR π
Written by Jonhnny Weslley <jw@jonhnnyweslley.net>. Modified by Mark Pitman <mark.pitman@gmail.com>, Brian Murrell <btmurrell@gmail.com>. shoutout to the devs, they ate π«Ά
π REPORTING BUGS π
<https://github.com/tj/git-extras/issues>
found something cursed? take it straight to the issues, no cap.
π SEE ALSO π
<https://github.com/tj/git-extras>
and that's the whole page, bestie β this little legend lives in Git Extras and it's dated May 2026. stay branched, stay slaying π β¨π
π¦ where this page comes from
- ubuntu stonking: git-extras 7.5.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms