문제

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