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
  • 105,803
  • 17
  • 152
  • 177
dmitryprogrammer
  • 366
  • 1
  • 11
  • 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,884
  • 3
  • 28
  • 37