简体   繁体   English

如何使用netbeans和svn从存储库中获取最新信息

[英]How do I get the latest from the repository using netbeans and svn

Suppose I'm happy to destroy all local changes. 假设我很乐意销毁所有本地变化。 When a right click a file and look at the subversion menu, there doesn't appear to be an option to simply replace everything with the latest from the repository. 右键单击文件并查看subversion菜单时,似乎没有一个选项可以简单地用存储库中的最新内容替换所有内容。

You can perform an Update on your working copy, and there's no risk on losing your local changes. 您可以对工作副本执行更新 ,并且不会有丢失本地更改的风险。 You might get conflicts that you will have to resolve manually only for files that svn does not know how to merge. 您可能会遇到冲突,您只需要手动解决svn不知道如何合并的文件。

On the other hand, if you'd like to destroy all your local changes, you have the revert command. 另一方面,如果您想销毁所有本地更改,则可以使用revert命令。

With a combination of both: first revert and then update you can achieve what you want and avoid possible conflict resolution. 结合使用两者:首先恢复然后更新,您可以实现您想要的并避免可能的冲突解决。

What happens if you do an update. 如果您进行更新会发生什么。 If the update does not throw an conflict then your local changes are irrelevant. 如果更新没有引发冲突,那么您的本地更改就无关紧要了。 If there is a conflict usually there should be a option window. 如果通常存在冲突,则应该有一个选项窗口。

In the option window you could say "Accept Theirs". 在选项窗口中,您可以说“接受他们的”。 This is how it works in intellij and Tortoise.. 这是它在intellij和Tortoise中的工作原理..

Ofcourse to accomplish what you want very easily, you could just delete all the files (not the entire versioned diretcory, just the files ) and click on update latest from repository. 当然可以很容易地完成你想要的东西,你可以删除所有文件(不是整个版本化的目录,只是文件),然后点击存储库中的最新更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM