1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #3569 closed

Allow user-defined default .hgignore file when creating a new repository

created an issue

Note: This is not the same as request https://bitbucket.org/tortoisehg/hgtk/issue/966/include-some-reasonable-defaults-in (which I agree is misguided).

I would like to be able to specify the contents of the .hgignore file that gets added when I create a repository. Currently, I believe I have to create the repository, then manually paste in my preferred .hgignore file.

This feature could be as simple as adding a text box labeled "Default .hgignore path" (or maybe ".hgignore template path") plus a Browse button to TortoiseHg Settings > Global Settings. Then all I would have to do is create my default .hginore file, put it somewhere on my machine, and set the path in my Global Settings (or by editing mercurial.ini). When I create a new repository, this .hgignore file would be copied into my repository instead of a blank one (assuming "Add special files" is checked).

Comments (3)

  1. Yuya Nishihara

    init: add option to copy user files instead of empty .hgignore (closes #3569)

    New tortoisehg.initskel option can be used to prepare user-defined .hgignore, .hgeol, README, etc. on "hg init".

    If specified, "add special files (.hgignore, ...)" checkbox is changed to "copy working directory files from skeleton".

    → <<cset 1046f9ab781d>>

  2. Log in to comment