我正在尝试为一个项目设置 .hgignore。 .hgignore 文件位于 .hg 文件旁边的项目根目录中。状态的输出如下,我想忽略 sdcard.cydsn\ARM_GCC_441\Debug 和 sdcard.cydsn\codegentemp 目录中的所有文件。我尝试了正斜杠/反斜杠和通配符的各种组合,但无法使其正常工作。有什么建议么?

C:\sdcard>hg st
M sdcard.cydsn\ARM_GCC_441\Debug\Clock_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\Clock_2.lst
M sdcard.cydsn\ARM_GCC_441\Debug\Cm3Start.lst
M sdcard.cydsn\ARM_GCC_441\Debug\Control_Reg_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CyDmac.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CyFlash.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CyLib.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CySpc.lst
M sdcard.cydsn\ARM_GCC_441\Debug\SPIM_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\SPIM_1_INT.lst
M sdcard.cydsn\ARM_GCC_441\Debug\SPIM_1_PM.lst
M sdcard.cydsn\ARM_GCC_441\Debug\TX.lst
M sdcard.cydsn\ARM_GCC_441\Debug\UART_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\UART_1_INT.lst
M sdcard.cydsn\ARM_GCC_441\Debug\UART_1_PM.lst
M sdcard.cydsn\ARM_GCC_441\Debug\clk.lst
M sdcard.cydsn\ARM_GCC_441\Debug\core_cm3.lst
M sdcard.cydsn\ARM_GCC_441\Debug\cyPm.lst
M sdcard.cydsn\ARM_GCC_441\Debug\cyfitter_cfg.lst
M sdcard.cydsn\ARM_GCC_441\Debug\cyutils.lst
M sdcard.cydsn\ARM_GCC_441\Debug\ff.lst
M sdcard.cydsn\ARM_GCC_441\Debug\main.lst
M sdcard.cydsn\ARM_GCC_441\Debug\miso.lst
M sdcard.cydsn\ARM_GCC_441\Debug\mmc.lst
M sdcard.cydsn\ARM_GCC_441\Debug\mosi.lst
M sdcard.cydsn\ARM_GCC_441\Debug\sdcard.a
M sdcard.cydsn\ARM_GCC_441\Debug\ss.lst
M sdcard.cydsn\codegentemp\lcpsoc3\index
M sdcard.cydsn\codegentemp\sdcard.ctl
M sdcard.cydsn\codegentemp\sdcard.cyfit
M sdcard.cydsn\codegentemp\sdcard.rpt
M sdcard.cydsn\codegentemp\sdcard.v
M sdcard.cydsn\codegentemp\sdcard.vh2
M sdcard.cydsn\codegentemp\sdcard_timing.xml
M sdcard.cydsn\sdcard.cyfit
M sdcard.cydsn\sdcard.cyprj
M sdcard.cydsn\sdcard.cyprj.sean
M sdcard.cydsn\sdcard.rpt
M SD卡.cywrk
M SD卡.cywrk.sean
? .hgignore

最佳答案

如果您已经在跟踪文件,那么在您执行以下操作后
hg add .hgignore
您需要对不想再跟踪的文件进行 forget.hgignore 不会忽略您已经在跟踪的文件。

关于mercurial - .hgignore 不适合我,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5248532/

10-13 05:32