FossilSCM,添加时忽略文件
我做了一些研究,但老实说似乎无法弄清楚这一点。
您可以设置一些选项来让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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以使用
settingsignore-glob
命令列出目录/要忽略的文件作为逗号分隔列表。*/*.suo,*/*/bin/*,*/*/obj/*
。fossil settingsignore-glob
以列出已应用的忽略列表,或fossilsettingsignore-glob
list-of-files< /em>.例如,在命令行上您可以执行以下操作:
这将忽略 Fossil 存储库根树中每个子目录中的所有 .suo 文件,以及 bin 和 中的所有文件。根目录中每个目录的
dir
子目录。You can use the
settings ignore-glob
command to list the directories/files to ignore as a comma-separated list.*/*.suo,*/*/bin/*,*/*/obj/*
.fossil settings ignore-glob
to list the applied ignore list, orfossil settings ignore-glob
list-of-files..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:
This would ignore all
.suo
files in every subdirectory at the Fossil repository root tree, and all the files in thebin
anddir
subdirectories at the each of the directory in the root directory.如果您想要 .gitignore 或 .hgignore 之类的文件,您可以阅读 https://www.fossil-scm.org/index.html/doc/tip/www/settings.wiki
If you want something like .gitignore or .hgignore, you can read https://www.fossil-scm.org/index.html/doc/tip/www/settings.wiki
请参阅化石开发存储库中的此签入。您所要求的已得到落实。
See this check-in in fossil development repository. What you asked for has been implemented.
Fossil 的最新版本有一个
addremove
命令,它将添加所有额外内容并删除工作树中所有丢失的文件。--ignore-glob
开关可用。也许这就是您正在寻找的?
否则你可能会这样做:
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 :
在 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.
这是因为我已经添加了文件,而化石跳过了重复的“添加”操作,OMG。
It is because I have already added the file, and fossil skipped the duplicated "add" operation, OMG.