Skip to content

Instantly share code, notes, and snippets.

@adduc
Created March 31, 2020 06:14
Show Gist options
  • Save adduc/b893dff6388c5d71c315af284312934d to your computer and use it in GitHub Desktop.
Save adduc/b893dff6388c5d71c315af284312934d to your computer and use it in GitHub Desktop.
hgrc for hg-git
[extensions]
git =
[alias]
npull = !$HG git; $HG nukebookmarks; $HG pull
nukebookmarks = !$HG bookmarks -q | xargs -r $HG bookmark -d

This example shows how alias can be defined for clearing out bookmarks managed by hg-git prior to pulling.

I had taken this off a comment on an issue, and modified to eliminate errors when rerunning hg nukebookmarks.

If you didn't know, mercurial supports partial matching (hg nuke should work if no conflicting aliases/extensions are installed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment