如何仅提交您“添加”的文件subclipse 中的版本控制?

发布于 2024-08-11 09:15:32 字数 318 浏览 7 评论 0原文

我只是花了相当多的时间在版本控制下选择我想要的文件和目录。我在 eclipse 下运行 subclipse 。我右键单击“团队”,“添加到版本控制”。现在我只想提交那些无需右键单击整个目录的文件,其中包含大量我不希望由版本控制处理的媒体文件。如果我进入该目录下的 Team/Commit,它会挂起很长时间...我认为通过“添加到版本控制”有一个选项可以仅提交这些文件。我只是不知道该怎么做。

我希望我正确解释了这个问题..

更新: 由于人们更多地讨论忽略文件的方法,而不是将标记为“添加”的内容提交到版本控制,因此让我换一种说法。 “添加到版本控制”到底有什么作用?似乎是一个没有用的功能。

I just spent a fair amount of time selecting the files and directories I wanted under version control. I'm running subclipse under eclipse. I right clicked, Team, Add to Version Control. Now I want ONLY those files committed without right clicking the whole directory which contains a huge number of media files that I don't want handled by version control. If I go Team/Commit under that directory it hangs for a very long time... I thought by "Add to Version Control" there was an option to commit those files only. I just don't know how to do it.

I hope I explained the question properly..

UPDATE:
Since people are talking more about ways to ignore files rather than committing what you're marked as "Add"ed to Version Control, let me put this a different way. What does "Add to version control" do exactly? It seems to be a feature without use.

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

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

发布评论

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

评论(3

樱&纷飞 2024-08-18 09:15:33

对版本控制下不需要的资源使用 svn:ignore (Team > Add to svn:ignore)

use svn:ignore for the resources you don't need under version control (Team > Add to svn:ignore)

梦在夏天 2024-08-18 09:15:32

Subclipse 包括未版本控制的文件和您在打开提交对话框时专门标记为添加的文件。它并不完美地反映命令行客户端的行为。您有两个选择:在 Subclipse 提交对话框中取消选中您不想提交的每个文件,或者使用命令行 svn 工具进行提交。命令行工具将仅提交您标记为添加的文件,并忽略其他文件。下面是一个简单的例子:

$ touch file
$ svn status
?       file
$ svn add file
A         file
$ svn status
A       file
$ touch file2
$ svn status
?       file2
A       file
$ svn commit -m "Added empty file"
Adding         file
Transmitting file data .
Committed revision 2.

? 表示 svn 不认识的文件,并且不会被 svn commit 自动置于版本控制之下。 A 表示计划添加的新文件。 Subclipse 试图通过允许您“将文件添加到版本控制”来反映此行为,这相当于命令行 svn add 。但还包括未计划在其提交对话框中添加的未版本化文件(我个人觉得这有点烦人)。如果你在命令行上运行svn status,那些你在Subclipse中“添加到版本控制”的文件将被标记为A,而那些你没有添加到版本控制的文件将被标记为A。用 ? 标记。您不必运行任何 svn add 命令,因为您已经在 Subclipse 中执行了该操作。

Subclipse includes both unversioned files and files you specifically marked for addition when you open the commit dialog. It does not perfectly mirror the behavior of the command-line client. You have two options: uncheck each file you do not want to commit in the Subclipse commit dialog or use the command-line svn tool to commit. The command-line tool will only commit files you have marked for addition and will ignore the other files. Here's a simple example:

$ touch file
$ svn status
?       file
$ svn add file
A         file
$ svn status
A       file
$ touch file2
$ svn status
?       file2
A       file
$ svn commit -m "Added empty file"
Adding         file
Transmitting file data .
Committed revision 2.

? denotes a file that it unknown to svn and will not be put under version control automatically by svn commit. A denotes a new file that is scheduled for addition. Subclipse is trying to mirror this behavior by allowing you to "add a file to version control", which is the equivalent of the command-line svn add. but also includes unversioned files not scheduled for addition in its commit dialog (which I personally find somewhat annoying). If you run svn status on the command-line, those files which you "added to version control" in Subclipse will be marked with an A while those you did not will be marked with a ?. You won't have to run any svn add commands since you did that already in Subclipse.

分分钟 2024-08-18 09:15:32

您可以在 Preferences/Team/Ignored resources 中添加模式(与 svn:ignore 不同)。如果它不再有帮助,您也可以将其删除。

You can add a pattern in Preferences/Team/Ignored resources (it's not the same as svn:ignore). You can also delete it, if it is no longer helpful.

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