Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.hgignore not working for mercurial

I use mercurial for php projects and my .hgignore file is not working. It's supposed to be placed in the .hg/ folder, isn't it?

.hgignore

/.hg/.hgignore file

# Allow *. syntax
syntax:glob

# Ignore these files
.hgignore
.htaccess
.hg/*
like image 548
designer-trying-coding Avatar asked Feb 26 '10 05:02

designer-trying-coding


2 Answers

There is no mention in the .hgignore page of that file being inside .hg:

The .hgignore file sits in the working directory, next to the .hg folder.

And whatever file you want to ignore, you must be sure they are not already tracked. If they are, you need to remove them first, and then add them as private (non-tracked) file.

like image 95
VonC Avatar answered Sep 17 '22 18:09

VonC


Just from memory I think .hgignore needs to live in the repository root. You certainly don't need to tell it to ignore the .hg folder, that will happen more or less automatically. Any reason why you don't want your ignore and access settings in your repo?

like image 38
Johannes Rudolph Avatar answered Sep 21 '22 18:09

Johannes Rudolph