Forrest logo
back to the hg tool

hg-update:tldr:c9135

hg-update: Update to the tip of the current branch.
$ hg update
try on your machine

The hg update command is a command used in the Mercurial version control system to update the working directory to a specific revision or branch.

When you run hg update, it will pull changes from the repository and update your working directory. By default, it will update to the latest revision in the currently active branch.

However, you can also provide an argument to hg update to specify a specific revision or branch to update to. For example, you can specify a revision number like hg update 10 to update to revision 10, or you can specify a branch name like hg update feature-branch to update to the latest revision in the "feature-branch" branch.

It's important to note that running hg update may potentially overwrite any uncommitted changes in your working directory. So it is recommended to commit or stash any changes before running this command to avoid losing any work.

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