合并时忽略文件/文件夹 [英] Ignore files/folders on merge

查看:183
本文介绍了合并时忽略文件/文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用SVN对我的软件项目进行版本控制.在一个正在进行的项目中,我有主干,用​​于客户的常用功能和规格以及分支,用于客户的特定功能.

I'm currently using SVN for versioning my software projects. On an ongoing project, I have the trunk, for client common features and specifications and branches, for client specific ones.

是否有任何方法可以标记一些我每次执行此操作都不应该合并到分支中的文件/文件夹?

Is there any way to mark some files / folders that shouldn't be merge into branches each time I perform such operation?

推荐答案

您可以通过虚拟方式进行合并,这意味着合并不会更改目标中的文件,但会在合并跟踪道具中对其进行标记.这样,更改永远不会在要合并的文件中发生!

There is an option that you merge virtually meaning that the merge does not alter the files in the target but mark it in the merge tracking props. This way the changes will never occour in the files to be merged, ever!

此功能在命令行版本中称为仅记录.

The feature is called record-only in the command line version.

来自链接文本

-record-only选项与-r一起使用,并且完全按照您的想法执行:将修订版本标记为合并(如果使用-"修订版本号否定语法,则将其标记为合并),而不实际进行任何更改mergeinfo.例如,当某人以有效地合并已经在其他地方进行的更改的方式手动编辑了文件时,这将很有用.不必在下一次同步合并中移植原始更改,从而在两个版本之间的微小差异处冒文本冲突的风险,您只需将更改记录为已合并即可. (有关更多详细信息,请参见合并跟踪要求"和"Subversion"一书中的阻止更改".)

The --record-only option works with -r and does exactly what you think it does: it marks a revision as merged (or unmerged, if using the "-" revision number negation syntax), without actually changing anything besides the mergeinfo. For example, this would be useful when someone has hand-edited a file in such a way as to effectively incorporate a change that was already made somewhere else. Rather than have the original change be ported over in the next synchronization merge, thus risking textual conflicts wherever the two versions trivially differ, you can just record the change as already merged. (See the merge-tracking requirements, and Blocking Changes in the Subversion book, for more details.)

这篇关于合并时忽略文件/文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆