0

A file was added accidentally to a Mercurial repository. How can I untrack it so that it is not included in the next commit? I'd also be interested to know how to accomplish the same task in git.

peak
  • 88,177
  • 15
  • 123
  • 150
  • 1
    Possible duplicate of [How to stop tracking a file without deleting it on Mercurial](http://stackoverflow.com/questions/8482538/how-to-stop-tracking-a-file-without-deleting-it-on-mercurial) – JDurstberger Dec 22 '15 at 07:03

1 Answers1

3

You want to become aquainted with

hg forget FILENAME

It works for both, already committed and uncommitted files.

planetmaker
  • 5,609
  • 3
  • 25
  • 35