git - 项目演变、分支还是新的仓库?
我开发了一个在 GitHub 上发布版本的 Google App Engine Web 应用程序。
我将“移植”此应用程序,使其与 GAE 无关;该移植将有几个与原始项目相同的文件,但也有不同的文件系统结构。
是创建一个新分支 (nogae
) 并对其进行处理更好,还是创建一个新的 git 存储库 (project.nogae
) 更好?
有什么优点和缺点?
I have developed a Google App Engine web application versioned on GitHub.
I'm going to "port" this application making it GAE agnostic; this port would have several files in commons with the original project but also a different file system structure.
Is it better to create a new branch (nogae
) and work on it or is it preferable to create a new git repo (project.nogae
)?
What's the pros and cons?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两个分支的争论
如果两个版本紧密链接在一起,创建一个新分支会很有趣(其中一个版本的一些演变可能会在另一个版本上报告):
如果两个分支中的文件相同(即使它们的名称/路径不同),则分支是一个不错的选择。
两个项目的争论
但是,如果这两个项目将独立发展,几乎没有公共文件,那么两个单独的项目会更好。
如果公共文件集足够重要,则可以创建第三个项目并将其作为子模块导入前两个项目中。
Arguments for two branches
Creating a new branch is interesting if the two versions are tightly linked together (some evolutions on one are likely to be reported on the other):
If the files are the same in both branches (even if their names/paths are different), a branch is a good choice.
Arguments for two projects
But if the two projects will evolves independently, with few common files, then two separate projects are better.
If the common set of files is important enough, then a third project might be created and imported in the first two ones as a submodule.