Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions pages/common/hg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,34 @@
> Some subcommands such as `commit` have their own usage documentation.
> More information: <https://www.mercurial-scm.org/help/commands>.

- Execute a Mercurial command:
- Create an empty Mercurial repository:

`hg {{command}}`
`hg init`

- Display help:
- Clone a remote Mercurial repository from the internet:

`hg help`
`hg clone {{https://example.com/repo}}`

- Display help for a specific command:
- View the status of a local repository:

`hg help {{command}}`
`hg status`

- Display version:
- Add all new files to the next commit:

`hg --version`
`hg add`

- Commit changes to version history:

`hg commit {{[-m|--message]}} {{message_text}}`

- Push local changes to a remote repository:

`hg push`

- Pull any changes made to a remote:

`hg pull`

- Reset everything the way it was in the latest commit:

`hg update {{[-C|--clean]}}; hg purge`