[英]Maintaining a fork with patches in master
I want to maintain a fork with custom functionality added on top of the original code. 我想维护一个在原始代码之上添加了自定义功能的分支。 It is not a contribution to the project itself and won't be merged upstream.
这不是对项目本身的贡献,不会在上游合并。
What I want to achieve: 我要实现的目标:
My current plan is to have the upstream/master
branch in the fork repository as vendor
, from which my own master
will be branched. 我当前的计划是让fork库中的
upstream/master
分支作为vendor
,从中分支我自己的master
。 Whenever there is a stable release upstream I can pull & push it into the vendor
branch and than rebase my master
. 每当上游有稳定的发行版时,我都可以将其拉入并推入
vendor
分支,而不是重新调整master
。
Questions: 问题:
master
, or should I create the repository locally as described in this answer ? master
,还是应该按照此答案中的描述在本地创建存储库? A fork is just a more formal way to link those two GitHub repo. fork是链接这两个GitHub存储库的更正式的方式。
You don't even need to name upstream/master as "vendor": you can directly rebase your own master branch on top of that remote branch. 您甚至不需要将上游/主服务器命名为“供应商”:您可以直接在该远程分支之上重新建立自己的主分支。
git fetch upstream
git checkout master
git rebase upstream/master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.