执行'svn status'时如何忽略某些目录下的修改文件,但在执行'svn update'时仍然更新它们? [英] How to ignore modified files under some directory when executing 'svn status', but still get them updated when executing 'svn update'?

查看:42
本文介绍了执行'svn status'时如何忽略某些目录下的修改文件,但在执行'svn update'时仍然更新它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我本地有一些个性化的文件,不需要提交.

I have some personalized files locally, which are not need to commit.

他们搞乱了执行svn status的结果,所以我想把他们从svn status的结果中隐藏起来.

They mess up the result of executing svn status, so I want to hide them from the result of svn status.

但我仍然希望在执行 svn update 时更新它们.

But I still want them updated when executing svn update.

有没有办法在 Subversion 中实现这一点?

Is there any way to achieve this in Subversion?

我不关心可能的冲突,我会手动修复它们.

I do not care about possible conflict and will fix them manually.

推荐答案

没有好的方法可以拥有版本化文件,只能在 svn status/svn commit.

There is no good way to have a versioned file but to ignore it on svn status/svn commit.

这种情况的最佳做法是拥有文件的版本模板,并为每个工作副本制作一个副本,然后根据需要修改副本:

The best practice for such situation is to have versioned template of the file, and make a copy of it for every working copy, then modify a copy as mush as you like:

Versioned file:    config.txt.orig
Unversioned file:  config.txt

您也可以将未版本化的文件(config.txt)添加到svn:ignore,这样它就不会出现在svn status>.

You can also add the unversioned file (config.txt) to svn:ignore, so it will not show up in the svn status.

svn propedit svn:ignore .

<小时>

在您使用 TortoiseSVN 客户端的情况下,还有一个非标准的解决方案——特殊的 ignore-on-commit 变更列表:

更多资源:

这篇关于执行'svn status'时如何忽略某些目录下的修改文件,但在执行'svn update'时仍然更新它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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