hg rm without removing the file?

TK Soh teekaysoh at gmail.com
Thu Apr 26 10:37:37 CDT 2007


On 4/26/07, Marcin Kasperski <Marcin.Kasperski at softax.com.pl> wrote:
> Unless I miss sth, it is currently impossible to stop tracking
> the file without removing it (or moving it somewhere).
>
> It would be nice, if one could issue something like
>                  hg rm --keep some.file
> and remove the file from the repository point of view,
> but keep it in the directory.

To get Hg to stop tracking a file, you need to 'hg rm' the file and
add the filename into .hgignore. After the commit, you can 'hg cat' to
retrieve the file.


More information about the Mercurial mailing list