Questions tagged [hgignore]

The .hgignore file is used to configure the Mercurial SCM to ignore specific files or file extensions, excluding them from a repository.

In the system, the .hgignore file is used to configure the SCM to ignore specific files or file extensions, excluding them from a repository.

For questions that are specific to Mercurial's ignore mechanism, such as .hgignore syntax, use this tag. For VCS-agnostic questions, such as whether certain types of files should be checked into source control, use .

200 questions
166
votes
7 answers

Mercurial .hgignore for Visual Studio 2008 projects

What is a good setup for .hgignore file when working with Visual Studio 2008? I mostly develop on my own, only occasionly I clone the repository for somebody else to work on it. I'm thinking about obj folders, .suo, .sln, .user files etc.. Can they…
Johannes
  • 3,002
  • 4
  • 33
  • 36
154
votes
6 answers

How can I ignore everything under a folder in Mercurial

I am looking for an expression for the .hgignore file, to ignore all files beneath a specified folder. eg: I would like to ignore all files and folders beneath bin Actually any advice on how the expressions are formed would be great
Xian
  • 76,121
  • 12
  • 43
  • 49
119
votes
2 answers

Mercurial .hgignore for Visual Studio 2010 projects

Not to be confused with Mercurial .hgignore for Visual Studio 2008 projects I was asking whether if that same file can be reused for Visual Studio 2010, or some other extensions, etc should be added to it, & why?
Shady M. Najib
  • 2,151
  • 2
  • 19
  • 30
76
votes
5 answers

How to list all files in a repository in Mercurial (hg)?

Is there a command in mercurial that will list all files currently under source control? I can do a dir /s to list all files in my folder and subfolders, but I have no idea which have been added to my repository. I have a variety of excluded file…
JamesWampler
  • 962
  • 1
  • 8
  • 12
67
votes
3 answers

Mercurial ignore file

I'm trying to get Mercurial to ignore a configuration file, but I'm failing to get it working. I have created a repository on my server with hg init and cloned that repository to my computer. I then want to be able to edit the configurationj file…
Tom
  • 1,651
  • 3
  • 19
  • 19
63
votes
2 answers

Mercurial: Globally Ignore Files

I know about .hgignore and how I can ignore files on a project-by-project basis. I want to ignore stuff for all Mercurial repositories. Is there something I can stick in .hgrc? Or put a .hgignore in my $HOME path (I tried that already but maybe I…
mikeycgto
  • 3,368
  • 3
  • 36
  • 47
53
votes
8 answers

Mercurial: How to ignore changes to a tracked file

I have a file with database settings in my project which I have set to some defaults. The file is tracked by Mercurial and checked in. Since this file will be edited with different values various developer machines, is there a way I can tell…
Svish
  • 152,914
  • 173
  • 462
  • 620
43
votes
3 answers

hgignore: help ignoring all files but certain ones

I need an .hgdontignore file :-) to include certain files and exclude everything else in a directory. Basically I want to include only the .jar files in a particular directory and nothing else. How can I do this? I'm not that skilled in regular…
Jason S
  • 184,598
  • 164
  • 608
  • 970
42
votes
1 answer

Interconversion of gitignore and hgignore?

I'm just starting to use hg-git to push some mercurial repositories to github, and I'm realizing that if people check them out using git, they'll need a .gitignore file in the repository. Is there any automated way to convert hgignore to gitignore…
Ryan C. Thompson
  • 40,856
  • 28
  • 97
  • 159
41
votes
3 answers

hg local ignore

I could have sworn there was a way to keep a local ignore file in an hg repo, i.e. a file similar in function to .hgignore, but not checked into the repo. This could be used to ignore changes to an IDE project file if different IDEs are being used,…
fakeleft
  • 2,830
  • 2
  • 30
  • 32
40
votes
4 answers

Is there an ignore-on-commit option in mercurial?

Is there any way to ignore changes to some files on a commit with mercurial? I've got a specific situation where we have a default oracle tnsnames.ora file that points to 127.0.0.1, but some developers will modify it to point to other systems, but…
Nick Randell
  • 17,805
  • 18
  • 59
  • 74
37
votes
2 answers

Mercurial .hgignore for Visual Studio 2012 projects

I currently use the answer to a similar question for Visual Studio 2010 as my go to hgignore file. Are there any notable additions to include with VS2012? Below is a compiled list from many different sources. Gist here. I have found that projects…
TheGwa
  • 1,919
  • 27
  • 44
33
votes
4 answers

ignoring folders in mercurial

Caveat: I try all the posibilities listed here: How can I ignore everything under a folder in Mercurial. None works as I hope. I want to ignore every thing under the folder test. But not ignore srcProject\test\TestManager I try syntax:…
user2427
  • 7,842
  • 19
  • 61
  • 71
29
votes
2 answers

hg - Ignore directory at root only

In my project's .hgignore, I want to exclude /static/ (i.e., the static folder at the root of the directory), but not /templates/static/. How would I configure .hgignore to allow this?
BenGC
  • 2,814
  • 3
  • 23
  • 30
23
votes
1 answer

Global hgignore usage

In my mercurial.ini file, I call a global hgignore file like this: [ui] ignore = ~/hgignore.ini This refers to a hgignore.ini file which is in the same directory as the mercurial.ini file. Does the local hgignore override the global hgignore? If…
Animesh
  • 4,926
  • 14
  • 68
  • 110
1
2 3
13 14