How to Delete Untracked Files in a Mercurial Repository

By  on  

Working around Firefox at Mozilla means that you need to get acquainted with mercurial, the version control system that rivals git and svn.  Like any tool, hg (mercurial) can be difficult until you're well versed with it.  And if you hg import a URL that doesn't match up with what's in the repo, you'll get a bunch of *.rej files that in your directory structure that show up every time you hg status.  Gross.

If you want to start from scratch and remove all those unwanted files, there are two steps.  The first step is enabling the purge extension within your ~/.hgrc file:

[extensions]
purge=

With the purge extension available, it's as easy as running hg purge to get rid of all of the unwanted files:

hg purge

With those unwanted files gone, it's easy to get back to the business of being productive with as few useless obstructions getting in your way!

Recent Features

  • By
    CSS 3D Folding Animation

    Google Plus provides loads of inspiration for front-end developers, especially when it comes to the CSS and JavaScript wonders they create. Last year I duplicated their incredible PhotoStack effect with both MooTools and pure CSS; this time I'm going to duplicate...

  • By
    I’m an Impostor

    This is the hardest thing I've ever had to write, much less admit to myself.  I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life.  All of those feelings were very...

Incredible Demos

  • By
    WordPress-Style Comment Controls Using MooTools or jQuery

    WordPress has a nice little effect on the Admin Dashboard where it shows and hides the comment control links when you mouseover and mouseout of the record's container. Here's how to achieve that effect using MooTools or jQuery. The XHTML Notice that we place the links into...

  • By
    iPad Detection Using JavaScript or PHP

    The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. In Apple's...

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!