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
    Write Simple, Elegant and Maintainable Media Queries with Sass

    I spent a few months experimenting with different approaches for writing simple, elegant and maintainable media queries with Sass. Each solution had something that I really liked, but I couldn't find one that covered everything I needed to do, so I ventured into creating my...

  • By
    Introducing MooTools Templated

    One major problem with creating UI components with the MooTools JavaScript framework is that there isn't a great way of allowing customization of template and ease of node creation. As of today, there are two ways of creating: new Element Madness The first way to create UI-driven...

Incredible Demos

  • By
    MooTools Overlay Plugin

    Overlays have become a big part of modern websites; we can probably attribute that to the numerous lightboxes that use them. I've found a ton of overlay code snippets out there but none of them satisfy my taste in code. Many of them are...

  • By
    MooTools 1.3 Browser Object

    MooTools 1.3 was just released and one of the big additions is the Browser object.  The Browser object is very helpful in that not only do you get information about browser type and browser versions, you can gain information about the user's OS, browser plugins, and...

Discussion

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