FossilSCM,添加时忽略文件

发布于 2024-10-08 21:53:05 字数 211 浏览 3 评论 0原文

我做了一些研究,但老实说似乎无法弄清楚这一点。

您可以设置一些选项来让fossil extras忽略文件,但不能fossil add?通过 Web 界面的配置选项很棒,我很高兴它确实适用于 extras 命令,但不适用于 add 命令?

如何配置 Fossil 以忽略 fossil add . 上的文件?

I've done some research, but honestly can't seem to figure this out.

You can set some set some options to have fossil extras ignore files, but not fossil add? The configuration options through the web interface is great, and I'm pleased that it does work for the extras command, but it doesn't apply to the add command?

How does one configure fossil to ignore files on fossil add .?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

野心澎湃 2024-10-15 21:53:05

您可以使用settingsignore-glob命令列出目录/要忽略的文件作为逗号分隔列表。

  1. 在存储库的网络界面上,转到管理菜单,选择设置并输入要忽略的以逗号分隔的目录列表;例如:*/*.suo,*/*/bin/*,*/*/obj/*
  2. 或者,您可以在命令行上键入 fossil settingsignore-glob 以列出已应用的忽略列表,或 fossilsettingsignore-glob list-of-files< /em>.
  3. 您还可以在项目根目录下创建/编辑 .fossil-settings/ignore-glob ,并插入要忽略的以逗号分隔的文件/目录列表;我没有亲自测试过这一点,但我记得在网上读过这篇文章。

例如,在命令行上您可以执行以下操作:

fossil settings ignore-glob "*/*.suo,*/*/bin/*,*/*/obj/*"

这将忽略 Fossil 存储库根树中每个子目录中的所有 .suo 文件,以及 bin 和 中的所有文件。根目录中每个目录的 dir 子目录。

You can use the settings ignore-glob command to list the directories/files to ignore as a comma-separated list.

  1. On your repository's web interface, go to the Admin menu, select Settings and type the comma-separated list of directories to ignore; for example: */*.suo,*/*/bin/*,*/*/obj/*.
  2. Alternatively, on the command line you can type fossil settings ignore-glob to list the applied ignore list, or fossil settings ignore-glob list-of-files.
  3. You can also create/edit the .fossil-settings/ignore-glob at the root of the project and insert the comma-separated list of files/directories to ignore; I have not personally tested this, but I remember reading this online.

For example, on the command line you can do:

fossil settings ignore-glob "*/*.suo,*/*/bin/*,*/*/obj/*"

This would ignore all .suo files in every subdirectory at the Fossil repository root tree, and all the files in the bin and dir subdirectories at the each of the directory in the root directory.

方圜几里 2024-10-15 21:53:05

如果您想要 .gitignore 或 .hgignore 之类的文件,您可以阅读 https://www.fossil-scm.org/index.html/doc/tip/www/settings.wiki

mkdir .fossil-settings
echo '*/*.suo' >> .fossil-settings/ignore-glob
echo '*/*/bin/*' >> .fossil-settings/ignore-glob
fossil add .fossil-settings

If you want something like .gitignore or .hgignore, you can read https://www.fossil-scm.org/index.html/doc/tip/www/settings.wiki

mkdir .fossil-settings
echo '*/*.suo' >> .fossil-settings/ignore-glob
echo '*/*/bin/*' >> .fossil-settings/ignore-glob
fossil add .fossil-settings
权谋诡计 2024-10-15 21:53:05

请参阅化石开发存储库中的此签入。您所要求的已得到落实。

See this check-in in fossil development repository. What you asked for has been implemented.

预谋 2024-10-15 21:53:05

Fossil 的最新版本有一个 addremove 命令,它将添加所有额外内容并删除工作树中所有丢失的文件。 --ignore-glob 开关可用。

也许这就是您正在寻找的?

否则你可能会这样做:

fossil extras | xargs fossil add

very recent versions of Fossil have an addremove command that will add all extras and remove all missing files in your working tree. The --ignore-glob switch is available.

Perhaps this is what you are looking for?

Otherwise you could probably just do :

fossil extras | xargs fossil add
梨涡 2024-10-15 21:53:05

在 Windows 7 上(未在其他平台上测试)

如果您执行

fossil add *.*

所有ignore-glob 设置都会被忽略(所有文件都会添加)。

如果您执行

fossil add .

,则使用ignore-glob设置。

On Windows 7 (not tested on other platforms)

If you do

fossil add *.*

All ignore-glob settings are ignored (all files are added).

If you do

fossil add .

then ignore-glob settings are used.

孤者何惧 2024-10-15 21:53:05

这是因为我已经添加了文件,而化石跳过了重复的“添加”操作,OMG。

It is because I have already added the file, and fossil skipped the duplicated "add" operation, OMG.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文