2025-03-14 21:59:59 -06:00
|
|
|
# hg update
|
|
|
|
|
|
|
|
|
|
> Update the working directory to a specified changeset.
|
|
|
|
|
> More information: <https://www.mercurial-scm.org/doc/hg.1.html#update>.
|
|
|
|
|
|
|
|
|
|
- Update to the tip of the current branch:
|
|
|
|
|
|
|
|
|
|
`hg update`
|
|
|
|
|
|
|
|
|
|
- Update to the specified revision:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg update {{[-r|--rev]}} {{revision}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Update and discard uncommitted changes:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg update {{[-C|--clean]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Update to the last commit matching a specified date:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg update {{[-d|--date]}} {{dd-mm-yyyy}}`
|