在 Eclipse 中执行 SVN 提交时忽略目录

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8180247/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:41:59  来源:igfitidea点击:

Ignoring directory when doing a SVN commit in Eclipse

eclipsesvn

提问by Rajat Anantharam

I am currently using Eclipse (Indigo Service Release 1) for Android development. When I do try to "commit" changes which I make to a specific project, I am prompted to commit all the files under "bin" directory.

我目前正在使用 Eclipse(Indigo Service Release 1)进行 Android 开发。当我尝试“提交”对特定项目所做的更改时,系统会提示我提交“bin”目录下的所有文件。

I do not want to commit it and a simpler solution is to un-check them all every time I commit. However this is getting annoying and I was wondering if there is a permanent fix to it.

我不想提交它,一个更简单的解决方案是每次提交时都取消选中它们。然而,这很烦人,我想知道是否有永久修复它。

I tried :

我试过 :

Preferences -> Team -> Ignore Resources -> Add Pattern with "bin" as the added pattern.

Preferences -> Team -> Ignore Resources -> Add Pattern with "bin" 作为添加的模式。

However it doesn't really provide a permanent solution.

然而,它并没有真正提供永久的解决方案。

Any suggestions?

有什么建议?

回答by earcam

You need to set the svn:ignore property.

您需要设置 svn:ignore 属性。

From within Eclipse this is best achieved by right clicking on the bindirectory (in Package Explorer/Navigator). Then select Team -> Add to svn:ignore and in the subsequent dialog select "Resource(s) by name".

在 Eclipse 中,最好通过右键单击bin目录(在包资源管理器/导航器中)来实现。然后选择 Team -> Add to svn:ignore 并在随后的对话框中选择“Resource(s) by name”。

When you next commit the project the newly set svn:ignore properties will be committed too and the bindirectory (and contents) will be permanently excluded.

当您下次提交项目时,新设置的 svn:ignore 属性也将被提交,并且bin目录(和内容)将被永久排除。

Steps:

脚步:

  1. Turn off automatic build and clean the project.
  2. If the directory is already committed, do Team -> revert, delete it (deleting in Eclipse will do an svn delete) and then commit this change.
  3. Now recreate the directory (running your build may do this)
  4. Then on the directory select Team -> Add to svn:ignore and in the subsequent dialog select "Resource(s) by name".
  1. 关闭自动构建并清理项目。
  2. 如果该目录已经提交,请执行 Team -> revert,删除它(在 Eclipse 中删除将执行svn delete),然后提交此更改。
  3. 现在重新创建目录(运行您的构建可能会这样做)
  4. 然后在目录中选择 Team -> Add to svn:ignore 并在随后的对话框中选择“Resource(s) by name”。

回答by user3359343

if you can not add files or Directories section in the " svn: ignore property " One solution is to not hide the eclipse view all files or folder not committer . right click on the folder and then select delete from view

如果您无法在“svn:ignore property”中添加文件或目录部分,一种解决方案是不隐藏 eclipse 查看所有文件或文件夹而不是提交者。右键单击文件夹,然后选择从视图中删除

回答by jumping_monkey

What worked for me:

什么对我有用:

1.In File Explorer, right-click on SVN project folder-name
2.Click on "SVN Commit..."
3.A "commit" window will appear
4.Right-click on the folder/file that you want to ignore
5.Click on Add to ignore list
6.Select the folder/file
7.Commit the "property change" to SVN

1.在文件资源管理器中,右键单击SVN项目文件夹名称
2.单击“SVN提交...”
3.将出现“提交”窗口
4.右键单击要忽略的文件夹/文件
5.单击添加忽略列表
6.选择文件夹/文件
7.提交“属性更改”到 SVN

Voila!

瞧!