本文介绍了将hgignore文件应用于已提交的文件Mercurial回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试执行类似于此处的操作:将.gitignore应用到已提交的文件

Trying to do something similar to here: Applying .gitignore to committed files

将新的hgignore文件应用于已提交的文件的位置.

Where you apply the new hgignore file to the already committed files.

我的node_modules文件夹已经提交了数千个文件,我想使用新的hgignore文件将其删除.

I have node_modules folder already committed with thousands of files and I'd like to remove it by using the new hgignore file.

我无法在网上找到任何可用于Mercurial回购的东西,有什么想法吗?谢谢!

I can't find anything online for it to work on a Mercurial repo, any ideas? Thanks!

推荐答案

  1. 编辑.hgignore以匹配您要忽略的文件
  2. hg forget "set:hgignore()"并提交
  1. Edit .hgignore to match files you want to ignore
  2. hg forget "set:hgignore()" and commit

查看实际情况:

另请参阅:

  • hg remove all files listed in .hgignore
  • How to check which files are being ignored because of .hgignore?

这篇关于将hgignore文件应用于已提交的文件Mercurial回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 00:27