如何在 Subclipse 中从与 svn repo 的同步中排除文件?

发布于 2024-10-16 15:16:11 字数 168 浏览 2 评论 0原文

我想在与 svn 存储库同步期间排除检查 Eclipse 项目中的文件 (.properties)。如果我在 Eclipse 项目中对此 .properties 文件进行更改,则会标记其图标,指示该项目未与存储库同步。我怎样才能避免这种情况?

我不想从存储库中排除这个文件,因为我会时不时地提交一个新版本。

I want to exclude a file (.properties) in my project in Eclipse from being checked during synchronization with the svn repo. If I make a change in this .properties file in my Eclipse project, its icon will be marked indicating that the project is not synchronized with the repo. How can I avoid this?

I don't want to exclude this file from the repo, because from time to time I will commit a new version.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

汹涌人海 2024-10-23 15:16:11

转到“窗口”->“首选项”->“团队”->“忽略的资源”,然后在其中添加您的模式。这样您就可以绕过“svn:忽略按钮已禁用”问题,并且可以填写自己的模式,而不仅仅是您选择的文件。

在您的情况下,您应该添加 .properties 作为模式。它将识别所有具有该名称的文件并忽略它们,即使它们已经在存储库中。但是,如果您已经提交了它们,您还应该从 svn 中删除它们。

Go to Window->Preferences->Team->Ignored Resources and add your pattern there. This way you bypass the "svn:ignore button disabled" problem and you get to fill in your own pattern, not only the files that you select.

In your case you should add .properties as a pattern. It will idefntify all the files with that name and ignore them, even if they are already in the repository. But, you should also delete them in from the svn if you've already commited them.

幸福丶如此 2024-10-23 15:16:11

执行以下操作:-

右键单击​​要排除的文件 ->团队->添加到 svn:ignore

顺便说一句,当您对文件进行更改时,SUPPOSED 会说它与存储库不同步。那完全没问题。如果您从存储库中排除此文件,那么您将不会对该特定文件应用任何版本控制,这从一开始就违背了使用版本控制的目的。换句话说,如果您不小心删除了该文件或弄乱了该文件,您将无法从存储库获取副本。在执行上述步骤之前,请确保这是您想要的。

Do this:-

Right click on the file you want to exclude -> Team -> Add to svn:ignore

By the way, when you make a change to a file, it is SUPPOSED to say it is not synchronized with the repo. That's totally fine. If you exclude this file from the repo, then you will not have any versioning applied to this particular file, which kind of defeats the purpose of using a version control in the first place. In another word, if you accidentally delete this file or mess up this file, you cannot get a copy from the repo. Just make sure this is what you want before you do the above step.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文