Reputation: 9587
My team uses a publicly available github hosted project as a submodule in our main project. We would like to manage our own patches against that project, without pushing upstream, but then we can't share those patches unless we have a mirror where we push our private branch.
Assuming we have the mirror, our submodule needs two remotes: one where we fetch upstream changes from, and one where we push merges with our patch branch. How can we store the information about the remotes with the submodule (or with the superproject), so that, every member of the team can trivially perform an upstream update, without having to git add remote upstream ...github...project.git
.
We intend to solve the problem by writing a shell script to automate the process and a file for storing the upstream remotes, but is there a git way of doing this?
May be related, but I don't see a proper solution: git add remote in submodule
Upvotes: 13
Views: 3043
Reputation: 9587
The current ansatz is this:
submodule/.gitupstream
file store the urlThen manually:
I'd like to see a better, possibly git built-in solution though.
Upvotes: 4