如何使用 Surround SCM 忽略文件?
我使用的 Surround SCM 的目录结构如下所示:
root/
src/
somecode/
lib/
我的工作目录如下所示:
root/
.settings/
src/
somecode/
lib/
someotherdirectory/
file.txt
基本上,如果我的 .settings(目录)或 file.txt 的本地副本有,我不希望 Surround 向我报告改变了。这看起来很简单 - 就像 svn 中的忽略一样,但我似乎找不到一种方法来使用环绕来做到这一点。我似乎有很多不需要由我正在使用的 scm 工具处理的本地文件,并且我希望它们不要出现在我的递归差异屏幕中。
关于我如何做到这一点有什么想法吗?
I am using surround SCM with a directory structure that looks like the following:
root/
src/
somecode/
lib/
my working directory looks like this:
root/
.settings/
src/
somecode/
lib/
someotherdirectory/
file.txt
Basically, I don't want surround to report to me if my local copy of .settings (a directory) or file.txt have changed. It seems simple - like an ignore in svn, but I can't seem to find a way to do it with surround. I seem to have a lot of these local files around that don't need to be dealt with by the scm tool I'm using, and I'd prefer them not to show up in my recursive differences screen.
Any thoughts on how I might do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
也许模拟该功能的一种方法是使用目录隐藏:
所以你可以先获取该目录,然后隐藏它。
Maybe a way to emulate that feature would be to use directory cloaking:
So you could first get that directory, then cloak it.
在早期的 Surround SCM 版本中,只有一个服务器/主线选项可以忽略文件或目录,如果该主线上的所有项目都应用相同的忽略规则,则该选项非常有用。从 Surround SCM 2019.1 开始,除了服务器/主线选项之外,还有其他两种方法来指定忽略规则。
In earlier Surround SCM versions, there was only a server/mainline option to ignore files or directories, which was useful if all projects on that mainline applied the same ignore rules. Starting in Surround SCM 2019.1, in addition to the server/mainline options, there are two other methods to specify ignore rules.
转至 Surround SCM 客户端中的“服务器选项”对话框,然后导航至“文件名/扩展名”类别。有一个“忽略文件或目录名称”设置允许您执行此功能。还有一个“忽略文件扩展名”设置,可能对 .OBJ 文件等有用。
正如 VonC 指出的,您还可以使用 Surround SCM 中的隐藏存储库功能,但您需要对 .settings 目录的每个实例执行此操作,并且仅在将目录添加到 Surround SCM 数据库后才隐藏目录。使用忽略设置告诉 Surround SCM 将此选项应用于所有实例,并在添加操作发生之前应用。
Go to the Server Options dialog in the Surround SCM Client and navigate to the File Names/Extensions category. There is an "Ignore file or directory name" setting that allows you to perform this functionality. There is also an "Ignore file extension" setting that might be useful for things like .OBJ files.
As VonC pointed out, you could also use the cloak repository feature in Surround SCM, but you would need to do that for each instance of the .settings directory and you only cloak directories after they are added into the Surround SCM database. Using the ignore setting tells Surround SCM to apply this option to all instances and it is applied before the add operation occurs.
您只需在 Windows 操作系统级别将文件夹设置为“隐藏”即可,
这也将为环绕 SCM 隐藏它。
You can just set the folder "hidden" on windows OS level,
that will also hide it for surround SCM.