Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mercurial .hgignore - won't ignore files

I'm trying to ignore a file in my project with .hgignore, and just can't figure it out. The file is located in app/views/patterns/_changes.erb (relative to the root of the project, where .hgignore is), and nothing I try seem to work:

#.hgignore
syntax: glob
app/views/patterns/_changes.erb
*changes.erb
public/files/* # this works

I read the .hgignore doesn't distinguish between folders and files, but can't really make it happen. Any clue? thanks.

like image 475
sa125 Avatar asked Feb 01 '10 14:02

sa125


1 Answers

If you just put:

_changes.erb

as an entry, that should work. It will ignore that file name, regardless of location. Note that if the file is already in the repository, it won't REMOVE it... it just won't prompt you to add it next time it sees a file with that name.

As a side note, if you want to remove a file from version control, use the command:

hg forget _changes.erb

(Note that this will remove the file from the current revision onwards. The file will always remain in past changesets -- i.e. it's not a total purge of the file.)

like image 159
Hank Avatar answered Oct 23 '22 05:10

Hank