HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

hg update — Update the working directory to a specified changeset. More information: <https://www.mercurial-scm.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thehg updatedirectorycommandupdatecliworkingspecified

Problem

How to use the hg update command: Update the working directory to a specified changeset. More information: <https://www.mercurial-scm.org/help/commands/update>.

Solution

hg update — Update the working directory to a specified changeset. More information: <https://www.mercurial-scm.org/help/commands/update>.

Update to the tip of the current branch:
hg update


Update to the specified revision:
hg update {{[-r|--rev]}} {{revision}}


Update and discard uncommitted changes:
hg update {{[-C|--clean]}}


Update to the last commit matching a specified date:
hg update {{[-d|--date]}} {{dd-mm-yyyy}}

Code Snippets

Update to the tip of the current branch

hg update

Update to the specified revision

hg update {{[-r|--rev]}} {{revision}}

Update and discard uncommitted changes

hg update {{[-C|--clean]}}

Update to the last commit matching a specified date

hg update {{[-d|--date]}} {{dd-mm-yyyy}}

Context

tldr-pages: common/hg update

Revisions (0)

No revisions yet.