Skip to content

Instantly share code, notes, and snippets.

@ryansturmer
Last active August 29, 2015 14:02
Show Gist options
  • Save ryansturmer/3a49611702d0194f0af7 to your computer and use it in GitHub Desktop.
Save ryansturmer/3a49611702d0194f0af7 to your computer and use it in GitHub Desktop.
Mercurial Cheat Sheet

Mercurial (hg) Cheat Sheet

The purpose of this document is to provide quick reference to the often-used commands of mercurial (hg).

Branches

List all branches

hg branches

Update to a branch

hg update <branchname>

Update to a branch (discard any local changes)

hg update <branchname> -C

Remote Repositories

Add a Remote Repository To add a remote repository, add a [paths] entry to the .hg/hgrc file for the repository:

[paths]
default = ssh://path/to/repository
myremote = ssh://another/path/somewhere/else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment