0

I'm about to start a git project that uses a lot of code and data from another open source project, and basically provides another "view" to the data. It will be hosted separately. I will need to pull upstream changes to both code and data.

What is a proper and useful way of handling this in git? I don't think I can simply fork the original project and keep pulling upstream changes, as it litters the root directory too much and I need to "encapsulate" it.

(The original project manager approves of my idea but is not interested in having it as part of their repo.)

Anna
  • 2,645
  • 5
  • 25
  • 34

1 Answers1

1

You can use a submodule or a subrepo, choose what fits your needs. In case of subrepo, basically you maintain a copy of the other repo in one of the folders inside your repo.

Learn about the differences between git submodule and subtree.

  • Thank you. It seems that Github doesn't support subrepos, do you know if that's right? – Anna Oct 08 '21 at 08:50
  • I've found something that might help in case you would go with submodules on github: https://gist.github.com/gitaarik/8735255 I haven't tried it myself, but the comments are promising, so I assume it should work for you too. – Albert Takács Oct 08 '21 at 09:54