Itay
Itay

Reputation: 57

How can I update one of my GIT repo sources?

I have a GIT repo (BitBucket) that uses a few open-source libraries. I need to make changes to one or more of the libraries but I'm afraid I won't be able to update these libraries when the sources get updated. It's easy to keep a forked repo in sync with the source but I'm not forking since I'm using multiple sources.

I would appreciate any suggestion.

Upvotes: 0

Views: 27

Answers (1)

Borys Serebrov
Borys Serebrov

Reputation: 16172

As I understand, you don't use the submodules and just have copies of the libraries in sub-folders of your project. If so than it is a good case for the 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.

Another option is to do the merge just using the diff tool, like 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.

Upvotes: 1

Related Questions