我对任何东西都很陌生,除了更基本的GIT功能。情况是这样的。
我有多个GIT回购:
Torque3D.git保存了Torque3D的源代码。车库游戏以源转储的形式提供更新(没有CSM访问)。由于车库游戏提供更新,Torque3D.git是更新的这些变化。
MyGame.git最初是从Torque3D.git中克隆出来的,并在适当的时候从Torque3D.git中提取这些更改。在这个场景中,我总是从Torque3D.git中提取所有的更改。这个很好用。
然而,当我们在MyGame.git中对引擎进行更改时,我们有时只想将一个特定的更改推回Torque3D.git,但并不是所有对MyGame.git所做的更改。
我们如何才能允许这样的访问?
发布于 2011-02-03 02:01:10
正如Amber所说,您可能希望通过这些更改创建一个单独的分支。下面是使用MyGame分支的git和用于跟踪T3D回购的Torque3D分支所做的工作:
# should already have: git remote add t3d git://any/url/or/path/to/your/Torque3D.git
# should already have: git remote add origin git://any/url/or/path/to/your/MyGame.git
git checkout -b patchedT3D t3d/master
# use git log origin/master and find hashes of changes you want. For each:
git cherry-pick c3df34262 # do this to add a rev's changes to Torque3d
# manually patch in whatever you want and commit if you have to
git push t3d +patchedT3D
# or push to whichever branch you want to have your changes with patchedT3D:<whatever>
git checkout -b withPatched origin/master
git merge --strategy=ours patchedT3D -m "mark your MyGame trunk as using the patched T3D changes so they don't get re-merged in later"
git push origin withPatched:master这应该会给出一个潜在的过程来做这件事。
发布于 2011-02-03 01:38:04
创建一个单独的分支,只包含要向后推回Torque3D的更改,然后从该分支中提取到Torque3D回购。
https://stackoverflow.com/questions/4881812
复制相似问题