سؤال

I'm fairly new to Tortoise Hg, but it seems that what I want to do is possible. In my repository, I have 4 project folders, each of which contains a bin folder. To minimize the size of the push, I'd like to ignore any files in any bin folder (or any subdirectory!).

After searching around, I found that I needed to use a .hgignore in the root of the repo. The forum even provided code to do exactly what I wanted... or so it seemed. Alas, not matter what I try, files in the bin folder still show up in my commit window. I've recreated the .htignore file multiple times, both with TortoiseHg's tool and manually, I've tried both syntaxes, and I've tried all kinds of variations on my patterns.

Here are some I've tried (Using glob syntax. The regexp are similar) .

bin/
bin\
bin/*
bin\*
/bin
\bin
/bin/
\bin\
/bin/*

Am I missing something obvious here?

هل كانت مفيدة؟

المحلول

/bin/** in glob pattern (if files untracked, if they already versioned: hg forget before adding to hgignore)

نصائح أخرى

Noticed this on a Windows machine. Even though bin/ was listed in .hgignore, hg status continued to show files in the bin directory (none of which were added to the repo).

It turned out that the .hgignore that I pulled from the remote repository had Mac-style line endings. Changing the file to have unix-style line endings fixed the issue.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top