Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

New file automatically ignored

Eugenio Di Tullio October 17, 2013

Hi all,

I'm not expert using Sourcetree, even though it's almost an year that I use it for basic operations. Lately I noticed that every time I add new files in my project, they're not added to the verioning system and it took a while for me to understand why. I eventually found out that they are ignored, even though they shouldn't be because they're not listed in the .hgignore file (not even as a content of an ignored directory).
So far the solution is to manually check if the file have been ignored and then add them, but as it easy to imagine, it's not the most confortable situation. I'm always worried to forget something and lose some files.

Can someone try to explain me what's happening?
Thanks!

3 answers

1 accepted

1 vote
Answer accepted
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2013

Hi Eugenio,

This may well be because you're looking at the wrong .hgignore. There's a global .hgignore file also. An easy way to look for all of your hgignore files is to call "locate .hgignore" at the terminal. You'll probably find one alled /Users/<username>/.hgignore_global. This may well have an ignore pattern in it which is causing those files to be ignored.

Cheers

Peter West May 10, 2014

Does a syntax defined in .hgignore_global carry over to .hgignore files? The default for .hgignore files is regexp, but I notice in my .hg_ignore file that the syntax is defined as glob.

I assume that the syntax reverts when a new .hgignore file is encountered.

(I assume that some upgrade created the !/.hgignore_global file.)

1 vote
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2013

Can you confirm that your .hgignore does not have a regex that ignores files?

0 votes
Eugenio Di Tullio October 17, 2013

Timothy, thanks for your help, but that wasn't the case.
Kieran, you were right! I knew we had a global ignore file somewhere, but I always thought it was server-side. Editing it solved everything. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events