管理多个 Git 存储库/分支
我在 git 中遇到了一个情况,我想要一些关于如何正确管理的建议。
我目前有一个 HTML5 样板的分支,我正在使用它来满足自己的需求,并添加了上游以从 html5boilerplate 主存储库中提取提交。
我将在一个单独的项目中使用这个分支,该项目将与当前 html5boilerplate 的形式发生很大的变化,但我也想在发生变化时从主存储库中提取变化。
我的问题是:
我是否应该根据我的新项目分别拉出 html5boilerplate 和名称的另一个分支(添加上游以更改 master)?
我是否应该创建另一个 html5boilerplate 分支并从 html5boilerplate 的原始分支拉入上游(这听起来太复杂)?
分支是否足以管理此工作流程?
有更有效的方法吗?
先感谢您。
I have a situation in git that I would like some advice on how to manage properly.
I currently have a fork of HTML5 boilerplate that I am working with for my own needs and have the upstream added to pull in commits from the html5boilerplate master repo.
I am going to be using this fork for a separate project that will change form very drastically from what html5boilerplate currently is but I would also like to pull in changes from the master repo as they happen.
My questions are:
Should I pull another fork of html5boilerplate and name respectively based on my new project (adding upstream for changes to master)?
Should I create another fork of my fork of html5boilerplate and pull in upstream from my original fork of the html5boilerplate (this sounds too complex)?
Would branching be a suffice way to manage this workflow?
Is there a more effective way of doing this?
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在谈论本地存储库,您可以安全地在本地进行分叉,并且永远不会将更改推回您的分支。剩下的就是品味问题了。
If you are talking about your local repository, you can safely fork locally and never push back the changes to your branch. The rest is a matter of taste.