SVN:如何仅更新修订版中修改的文件
是否可以仅更新受上次提交影响的文件?最好在 Linux 上使用一个命令。
编辑:
示例。 首先我提交文件 1 和 2。然后我提交文件 3 和 4。现在我只想更新文件 3 和 4,而不更新 1 和 2。
Is it possible to update only the files that were affected by the last commit? In one command preferably, on linux.
EDIT:
Example.
First i commit files 1 and 2. Then i commit files 3 and 4. Now i want to update only files 3 and 4 without updating 1 and 2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想更新特定文件,则必须在命令行上提供它们:
如果您不想更方便,您可以编写一个脚本来执行此操作。
更新:在您问题中描述的示例中:您不需要更新文件,因为它们已经根据您之前所做的提交进行了更新。所以我认为您正在考虑不同的工作副本。
If you like to update particular files you have to give them on command line:
If you wan't it more handy you can write a script to do this..
Update:In the example what you described in your question: you don't need to update the files, cause they are already update based on the commit you did before. So i think you are thinking of a different working copy.
如果您想仅使用选定的提交更新工作副本,则必须将它们合并 - 您实际上是在使用从主干中精心挑选的提交创建本地分支,尽管最终的更新应该可以正常选择它们。您需要
找到所需的修订号,然后
将未来的提交 12345 合并到您的 WC 中。
或者,如果更改是在不相交的目录中提交的,您可以简单地
拆分 WC 的修订版并仅选取指定目录中的更改。
If you want to update your working copy with only selected commits, you have to merge them in - you're effectively creating a local branch with cherry-picked commits from trunk, although the final update should pick them up OK. You'll want
to find the revision number you want, then
to merge future commit 12345 into your WC.
Or, if changes are committed in disjoint directories, you can simply
to split the revision of your WC and pick up only changes in the named directory.