开发者

Prevent a file/folder from being committed (not ignore, I don't want it to be "seen" by SVN)

开发者 https://www.devze.com 2022-12-19 19:57 出处:网络
Basically, I want to do svn add . --force without the file being ever added into svn status. This is not开发者_开发问答 ignore, this means excluding it from all SVN activity, even the initial commit.

Basically, I want to do svn add . --force without the file being ever added into svn status. This is not开发者_开发问答 ignore, this means excluding it from all SVN activity, even the initial commit. How can I do this?


You realise ignoring using your SVN client stops it ever reaching the server? Or do you also need to keep all references out of your .svn dirs for some reason? If you don't svn add the files in the first place, then they won't be committed will they?


lookinto .svnignore


Leaving aside the obvious question of why you care whether a file shows up as unversioned or ignored when you run svn status:

You cannot do what you’re asking. Any file that is in your working copy but not in the repository will either be unversioned ('?') or ignored ('I') and there is no way to prevent SVN from telling you that short of removing those files.

But I guess if removing the files were an option, you wouldn’t have asked the question.

Don’t import them in the first place, and ignore them in SVN.


Sounds to me what you need is the svn:ignore property.

You set this property on a directory and it allows you tell specify what svn must totally ignore in that directory. Normally you use this facility so that svn does not try and checkin generated files (compiled stuff for example). You can set multiple values in this property.

Something ignored in this fashion will never be added or committed and svn will never try and sync files that are ignored in this fashion.

cvs had a similar facility specified as a file called .cvsignore - svn does not have that file, you use a property to achieve the same thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号