将 Hg 与 Grails 结合使用的最佳实践?
我应该办理什么手续/不办理什么手续?由于许多文件有时是自动生成的,我不完全确定如何使用版本控制来处理这个问题......它与标签有关吗?
例如,在 ANT 中,我知道不要签入我的 target/bin 目录...但是 Grails 对此又增加了一层混乱...因为一些代码是生成的,而其中一些是不是。
(随着我的深入,它可能会变得更清楚......但似乎需要某种方式来区分刚刚生成的内容以及开发人员修改的内容,以便需要将其放入版本控制中)
What should I check in/not check in? Since many of the files are sometimes auto-generated I'm not entirely sure how to handle this using version control...does it have something to do with tags?
For instance in ANT, I know not to check-in my target/bin directories...but Grails adds another level of confusion to this...since some of code is generated and some of it is not.
(It may become clearer as I go...but it seems to be that there needs to be some way of being able to tell what was just generated and what was modified by a developer so that it needs to be placed in version control)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是我最近的 grails 项目的 .hgignore 目录(删除了一些项目特定的内容):
Here's the .hgignore directory I've got on my most recent grails project (with a couple of project specific things taken out):
Grails 中生成的代码应该置于版本控制之下。它不是像类文件那样由构建过程生成的辅助可执行代码,而是属于源代码一部分的代码。生成的代码只是您的应用程序的起点,并且很可能在某个时候进行修改。
The generated code in Grails should be placed under version control. It's not secondary executable code that is generated by the build process like class files, but instead is code that is part of your source. The generated code is intended to be just a starting point for your application and will most likely be modified at some point anyway.
另请检查:
http://www.grails.org/Checking+Projects+into+ SVN
和这个:
https://stackoverflow.com/questions/4201578
Also check this:
http://www.grails.org/Checking+Projects+into+SVN
and this:
https://stackoverflow.com/questions/4201578