简体   繁体   English

如何使用git和git-flow设置派生仓库?

[英]How to set up a derived repo with git and git-flow?

I've got a main repository that's the core game engine and now I need to make another repository that will end up being an actual game. 我有一个主要的存储库,它是游戏的核心引擎,现在我需要制作另一个存储库,最终将成为一个实际的游戏。 Because I'll be using git-flow for both, I can't just fork the original and pull/push whenever I need the changes to the engine. 因为我将两者都使用git-flow,所以无论何时需要对引擎进行更改时,我都不能只是分叉原始文件并进行拉/推。 What I need preferably is to be able to take the changes that are on the master branch in the engine repo and merge those changes to the develop branch in the derived project. 我最好需要的是能够获取引擎仓库中master分支上的更改并将这些更改合并到派生项目中的development分支。 How would I set this up? 我该如何设置?

Check out Git submodules . 签出Git子模块 Looks like this is what suits your need. 看起来这很适合您的需求。

Following this got my project set up exactly the way I wanted it and allows me to update the copy of the main project whenever I want to: http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb 之后,我的项目就按照我想要的方式进行了设置,并允许我随时更新主项目的副本: http : //debuggable.com/posts/git-fake-submodules : 4b563ee4-f3cc-4061 -967e-0e48cbdd56cb

If anyone else wants to use this but runs into problems with pulling new versions of the base project, stash your changes before you pull. 如果其他任何人都想使用它,但是在拉动基础项目的新版本时遇到问题,请在拉动之前存储更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM