Search code examples
mercurialhgignore

how to remove a folder from tracking in mercurial


To ignore ./node_modules/ folder and .idea folder into .hgignore file so that I don't want to track them.

Currently I have the following rules on my .hgignore file.

*.orig
*./node_module/
*.idea/ 
*.rej
*~
*.o
tests/*.err

But abort error on hg status.


Solution

  • finally i found tip . here is how to . Foradding node_modules/ and .idea/ folder you need to specify the following.N.B > is refers terminal.

    touch .hgignore nano .hgignore

    add the following

    ^node_modules/
    ^.idea/
    

    Done !