将项目建立在“种子”回购的基础之上的正确的git工作流程是什么? [英] What is the proper git workflow for basing a project off a 'seed' repo?

查看:77
本文介绍了将项目建立在“种子”回购的基础之上的正确的git工作流程是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

举个例子:假设你有一个像Angular Seed这样的个人项目(这是Angular项目的起点 https:// github.com/angular/angular-seed )。

现在你想用它作为项目的起点(比如在线相册) 。

您不应该创建一个分支,因为您没有对种子项目进行变更。
但是如果github是你自己的repo,github不会让它分叉。

然后,

那么创建一个克隆的工作流程是什么呢?原始种子项目?我认为这是一个分叉。

解决方案

我想这里的正确答案是使用像Yeoman Generators这样的东西。 ( http://yeoman.io/ )你想用你的种子项目的git repo作为生成器。它不会让你不断从种子项目中引入变化。



使用两个遥控器的解决方案有效,但最终项目会发生分歧,以至于难以保持这些项目同步。


As an example: suppose you have a personal project like Angular Seed (which is a starting point for an Angular project https://github.com/angular/angular-seed).

Now you want to use that as a starting point for a project (say an online photo album).

You shouldn't just create a branch because you're not making a variation of the seed project. But github won't let you fork it if it's your own repo.

So what is the workflow to create a clone that can still pull in changes form the original seed project? I thought that was a fork.

解决方案

I think the right answer here is to use something like Yeoman Generators. (http://yeoman.io/) You want to use the git repo with your seed project as a generator. It wouldn't allow you to continually pull in changes from the seed project though.

The solution of using two remotes works, but eventually the projects will diverge enough that will make keeping those projects in synch very difficult.

这篇关于将项目建立在“种子”回购的基础之上的正确的git工作流程是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆