SVN 忽略隐藏文件(.project、.pydevproject 和 .files)
我想忽略 SVN 中的一些隐藏文件(例如 .project 和 .pydevproject)。它们目前已经在我们的主干中,所以我不想从主干中删除它们,因为这可能会给其他开发人员带来更多问题。所以我试图做的是运行:
svn propset svn:ignore .project .
但之后当我运行 svn status 时,它会返回:
M .
如果我对 .project 进行更改,它仍然会跟踪这些更改。我还在 /etc/subversion/config 中尝试了全局忽略,但没有成功。
您认为解决这个问题的最佳方法是什么?
谢谢。
I want to ignore some hidden files (like .project and .pydevproject) in SVN. They are already in our trunk at the moment so I don't want to delete them from the trunk since it may cause more problems for the other developers. So what I tried to do is to run:
svn propset svn:ignore .project .
but right after that when I run svn status, it returns:
M .
and if I make changes on .project, it still tracks those changes. I also tried global-ignores in /etc/subversion/config, no luck.
What do you think would be the best way to solve this problem?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
svn:ignore
仅适用于尚未添加的文件。不幸的是你不能以自动的方式做到这一点(至少我不知道有什么方法可以做到这一点)。
因此,您现在能做的就是:
svn rm
从存储库中删除文件svn up
之前将文件存储在某个位置svn up
> 并将删除的文件移回现在
.project
不会被 svn 跟踪,并且不会出现在svn st
中svn:ignore
works only for the files that haven't been added yet.Unfortunately you cannot do that in automatic way (at least I don't know any way of doing that).
So all you can do now is:
svn rm
svn up
svn up
and move the deleted files backNow
.project
is not tracked by svn and will not appear insvn st