Skip to content

Instantly share code, notes, and snippets.

@phargogh
Created February 11, 2020 02:33
Show Gist options
  • Save phargogh/c2815501322a4c2d64fc73788d4b0c63 to your computer and use it in GitHub Desktop.
Save phargogh/c2815501322a4c2d64fc73788d4b0c63 to your computer and use it in GitHub Desktop.
Mercurial (hg) commands I usually need and regularly forget

Which files changed on my feature branch?:

hg status --rev .:develop

Which commits belong to a named branch?:

hg log -r "branch(<branchname>) and 0:"

What heads exist on the current repository that have not been merged into the develop branch?:

hg log -r "head() & !ancestors(develop)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment