简体   繁体   中英

Mercurial [HG] - Get the list of .hgignore excluded files

I use this .hgignore file liberally in my projects, it has proven worthy so far.

However, every once in a while I'd like to do a reality check, to make sure it didn't eat up something valuable.

My question is: how can I find out the exact list of excluded files? (The files that actually match the .hgignore patterns)

Answers using TortoiseHg or command-line are welcome.

命令hg status --ignored (或hg status -i )列出已被忽略的文件。

The answer hit me while I was finishing the question (yet again).

It's trivial, actually:

  • Start by making sure there are no pending commits. 在此输入图像描述

  • (Re)move/rename the .hgignore file

  • Hit 'Refresh' in TortoiseHg's commit window. 在此输入图像描述

You'll now get the exact list of ignored files (+ the change to the .hgignore file itself).

Rubber ducking at its best. (Hmm, SO should add a badge for this :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM