如何更新我的 GIT 回购来源之一?
How can I update one of my GIT repo sources?
我有一个 GIT 存储库 (BitBucket),它使用了一些开源库。我需要对一个或多个库进行更改,但恐怕在源更新时我将无法更新这些库。保持分叉回购与源同步很容易,但我没有分叉,因为我使用的是多个源。
如有任何建议,我将不胜感激。
据我了解,您不使用子模块,只是在项目的子文件夹中有库的副本。如果是这样,那么 subtree merge:
就是一个很好的案例
The idea of the subtree merge is that you have two projects, and one of the projects maps to a subdirectory of the other one and vice versa. When you specify a subtree merge, Git is smart enough to figure out that one is a subtree of the other and merge appropriately — it’s pretty amazing.
另一种选择是仅使用 diff 工具进行合并,例如 kdiff3, where you can open two folders in it (one inside your repository and another with the new library copy), visually compare them and merge back to your project folder. See more details in the documentation。
我有一个 GIT 存储库 (BitBucket),它使用了一些开源库。我需要对一个或多个库进行更改,但恐怕在源更新时我将无法更新这些库。保持分叉回购与源同步很容易,但我没有分叉,因为我使用的是多个源。
如有任何建议,我将不胜感激。
据我了解,您不使用子模块,只是在项目的子文件夹中有库的副本。如果是这样,那么 subtree merge:
就是一个很好的案例The idea of the subtree merge is that you have two projects, and one of the projects maps to a subdirectory of the other one and vice versa. When you specify a subtree merge, Git is smart enough to figure out that one is a subtree of the other and merge appropriately — it’s pretty amazing.
另一种选择是仅使用 diff 工具进行合并,例如 kdiff3, where you can open two folders in it (one inside your repository and another with the new library copy), visually compare them and merge back to your project folder. See more details in the documentation。