Forrest logo
back to the hg tool

hg-branch:tldr:a3198

hg-branch: Create a new branch for the next commit.
$ hg branch ${branch_name}
try on your machine

This command is used in Mercurial (hg) version control system to create a new branch with the name specified by the variable ${branch_name}. When you run this command in the terminal or command prompt, it creates a new branch in your Mercurial repository, allowing you to work on a separate line of development without affecting the main branch or other existing branches. The ${branch_name} is a placeholder for the actual name of the branch you want to create. For example, if you want to create a branch called "feature-xyz" using this command, you would replace ${branch_name} with "feature-xyz" like this: hg branch feature-xyz After executing this command, you can switch to the newly created branch using the hg update command followed by the branch name, like hg update feature-xyz.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hg tool