.hgignore 文件没有忽略 maven target/site 目录
我已经创建了一个基本的 Maven/Mercurial 设置。我在工作目录中创建了一个 .hgignore 。我已将以下内容添加到 .hgignore 文件中(按照 https://www 中的说明.mercurial-scm.org/wiki/.hgignore
/target$
/.DS_Store$
.DS_Store$
我运行了 hg status 并且一切都被忽略了(如预期)
我运行了 mvn site。我运行 hg status 命令,除了 site 文件夹之外的所有内容都在 target 文件夹中被忽略...例如
~/dev/blah >hg st
? target/site/css/maven-base.css
? target/site/css/maven-theme.css
? target/site/css/print.css
...
注意:如前所述,目标文件夹中的其他文件(.class、.xml 等...)已被忽略...
目标/站点文件夹尚未添加到存储库(据我所知...)
有人知道我哪里出错了...?
更新:z3a启发我尝试^target/*$这似乎已经成功了......
I've created a basic maven/mercurial setup. I've created a .hgignore in the working directory. I have added the following to the .hgignore file (as per the instructions in https://www.mercurial-scm.org/wiki/.hgignore
/target$
/.DS_Store$
.DS_Store$
I had run hg status and everything was ignored (as expected)
I ran mvn site. Now, when I run the hg status command, everything but the site folder is being ignored in the target folder... e.g.
~/dev/blah >hg st
? target/site/css/maven-base.css
? target/site/css/maven-theme.css
? target/site/css/print.css
...
nb: as stated earlier, the other files in the target folder (.class, .xml, etc...) HAVE been ignored...
The target/site folder has not been added to the repository (as far as I can tell...)
anyone know where I'm going wrong...?
update: z3a inspired me to try ^target/*$ and that appears to have done the trick...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想忽略目标目录,但不想忽略 .hgignore 中的目标/站点,请输入如下内容:
If you want to ignore the target dir, but not the target/site in your .hgignore put something like this: