Skip to content

Instantly share code, notes, and snippets.

@dukeofgaming
Created June 9, 2014 04:12
Show Gist options
  • Save dukeofgaming/0c1155ca45f8e19b6bb6 to your computer and use it in GitHub Desktop.
Save dukeofgaming/0c1155ca45f8e19b6bb6 to your computer and use it in GitHub Desktop.
hg untrack
#Taken from:
# http://stevelosh.com/blog/2009/05/what-i-hate-about-mercurial/#hg-rm-is-a-confusing-mess
#Here’s part of the help for the hg rm command:
# This only removes files from the current branch,
# not from the entire project history. -A can be
# used to remove only files that have already been
# deleted, -f can be used to force deletion, and
# -Af can be used to remove files from the next
# revision without deleting them.
# What the hell? If -A won’t remove files that are
# still present, and -f forces the files to be
# deleted, why the fuck does combining them mean
# the exact opposite of both?
# I had to look up the syntax every single time I
# wanted to use this command, until I added this
# alias to my ~/.hgrc:
[alias]
untrack = rm -Af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment