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
.
Asked
Active
Viewed 615 times
0

peak
- 105,803
- 17
- 152
- 177

dmitryprogrammer
- 366
- 1
- 11
-
1Possible 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 Answers
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