HG(BRANCH)
πΈ HG(BRANCH) β like, the whole manual page, bestie πΈ
okay so this is the hg branch page from the Mercurial manual, and we're gonna get through it together, no skipping, promise π
β¨ NAME β¨
hg branch β set or show the current branch name π
π SYNOPSIS π
hg branch [-fC] [NAME]
that's it. that's the whole vibe. short king behavior honestly π
π¦ DESCRIPTION π¦
β οΈ not me dropping the most important thing first: branch names are permanent and global. like, forever. no take-backsies. if you want something light and swappable, usehg bookmarkto make a light-weight bookmark instead. and if you wanna actually understand named branches vs bookmarks, go readhg help glossary, it's giving study session π
With no argument, it just shows you the current branch name. With one argument, it sets the working directory branch name β and heads up, the branch won't exist in the repository until the next commit. so it's like, a promise, not a fact yet. β¨
Standard practice (iykyk) recommends that your primary development happens on the 'default' branch. that's the main character branch fr fr.
Unless you pass -f/--force, branch will not let you set a branch name that already exists. it said no duplicates, periodt.
Use -C/--clean to reset the working directory branch back to that of the parent of the working directory β basically it undoes a previous branch change. unbothered, moisturized, back to parent π§
Use the command hg update to switch to an existing branch. Use hg commit --close-branch to mark this branch head as closed. And when all heads of a branch are closed, the branch will be considered closed. that's the whole branch, gone, closed, bye π
Returns 0 on success. slay β
π OPTIONS π
-f,--forceβ set branch name even if it shadows an existing branch. yes, it's the "i heard you the first time" flag π-C,--cleanβ reset branch name to parent branch name. rewind moment π-r,--rev<VALUE[+]>β change branches of the given revs. this one is (EXPERIMENTAL) so like, tread carefully bestie, it's still in its testing era π§ͺ
[+] β a marked option can be specified multiple times. so yes, stack it, stack it, stack it π«Ά
and that's the whole page!! every flag, every warning, every hg command, all of it, untouched, just narrated with love π
this has been the HG(BRANCH) manual page, brought to you by the Mercurial manual itself. mwah, go commit something cute πβ¨π
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms