Rails 和 Git 工作流程建议
我需要一些关于我想要的 git 和 Rails 设置的建议。
基本上,对于我的第一个 Rails 应用程序,我使用了 GitHub 上的基本应用程序模板,然后进行了大量更改,现在拥有了一个相当定制的完整应用程序。
我现在已经提取了对基本应用程序模板中的文件所做的所有更改,并将更改提交到我的 github 存储库分支。理想情况下,我希望将基本应用程序模板作为我的应用程序中的分支,并与我的主应用程序一起重新设置它的基础。这实际上可能吗?
我想要这样做的原因是:我想让基本应用程序保持最新且功能正常,因此对于我的下一个项目,我可以从我的 github 分支克隆基本应用程序模板并开始工作。同样,如果有人修复了基本应用程序模板中的任何错误,我可以将这些修复程序与我将基本应用程序模板作为分支的任何应用程序合并吗?
这可能吗?有没有更好/更常见的方法来做到这一点?
提前致谢!
谢谢,
丹尼
I need some advice with my desired setup with git and Rails.
Basically for my first Rails application I used a base application template from GitHub, I then made a ton of changes and now have a full application which is fairly customised.
I have now extracted all of the changes I made to the files within the base application template and have committed the changes to my fork of the github repo. Ideally, I would like to have the base application template as a branch in my application and rebase it with my master. Is this actually possible?
The reason I want to do this: I want to keep the base application up to date and functional, so for my next project I can just clone the base application template from my github fork and get working. Likewise, if anyone fixes any bugs in the base application template, I could merge those fixes with any application I have the base application template as a branch?
Is this possible? Is there a better/more common way to do this?
Thanks in advance!
Thanks,
Danny
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个有趣的想法,尽管我认为在一堆更新之上重新建立整个项目历史记录可能比您意识到的更困难。
以下是如何在伪 git 中做到这一点:-)
如果应用程序模板只是一个 gem 文件或插件集合,这可能会起作用。但即便如此,您最好还是合并
master
和app_template
,这样您就不必重写整个应用历史记录。That's a interesting idea, though I think it might be harder than you realize to rebase an entire project history ontop of a bunch of updates.
Here's how you could do it, in pseudo-git :-)
This might work out if the app template was just a gem-file or a collection of plugins. But even then, you might be better off just merging
master
andapp_template
so you wouldn't have to rewrite your entire app history.