ASP.NET 中的 SVN 以及 Ankh 日常使用基础知识
我的团队现在在 ASP.NET 中设置了 SVN + Ankh,其中包含主干、分支和标签。我们切换分支,处理代码,但很多时候简单的修改后,文件就会出现莫名其妙的冲突。这是为什么呢?我怀疑我们对它的工作原理还不够了解。是否有什么该做和不该做的事情,或者我们应该如何处理日常变更和提交,而不引起冲突?是否有一个基本的操作顺序来实现 SVN zen?我们是在提交之前更新还是什么?非常感谢任何帮助。
My team now has an SVN + Ankh setup in ASP.NET with trunk, branches, and tags. We switch branches and work on code, but many times there will be inexplicable conflicts in files after simple changes. Why is this? I suspect we simply don't understand enough of how this works. Are there any do's and don'ts, or how should we be approaching our daily changes and commits, without causing conflicts? Is there a basic pecking order of operations to perform to achieve SVN zen? Are we updating before committing or something? Any help is greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
始终在提交之前更新。如果您确实使用分支,请不要使用 switch,或者仅当您真正了解 switch 命令及其工作原理时,才将分支检出到新的工作副本中,换句话说,创建一个新的工作副本。
Always update before commit. If you really work with branches don't use switch or only if you really undstand the switch command and how it works otherwise checkout a branch into a fresh working copy in other words create a new one.
始终在解决方案元素上进行分支、合并,确保在合并之前完全更新(ankhsvn 会对此发出警告),还要确保在合并之前没有修改过的文件。
阅读 svnbook 以了解何时使用正常合并以及何时使用重新集成。
最后,如果确实发生冲突,请确保您有一个好的 3way 合并工具来解决冲突。 AnkhSVN 自动识别其中很多,但我真的很喜欢 source gear diffmerge
Always branch, merge on the solution element, make sure you're fully up to date before merging (ankhsvn will warn about this), also make sure you have no modified files before merging.
Read up on svnbook for when to use normal merging and when to use reintegrate.
Finally, if a conflict does occur, make sure you have a good 3way merge tool to solve the conflict. AnkhSVN recognizes a lot of them automatically, but I really like source gear diffmerge