antonky
antonky

Reputation: 788

Push changes in a submodule that isn't owned by me

I have a repository A hosted on GitHub. There is another repository B also hosted on GitHub not owned by me, and it is in repository A as a submodule. I have made changes to repository B and committed on my local machine. How do I push these changes to repository A on GitHub? If I do git push in repository B it will push to the origin of repository B which I do not own, and these aren't changes that I want in the origin anyways.

Upvotes: 1

Views: 402

Answers (1)

FreshD
FreshD

Reputation: 3112

You have to fork repo B on GitHub and push your changes there. Then you either submit a pull request for the original B and if this one gets merged you can pull that changes in the submodule or change the submodule to your own fork. With the second approach you will also be able to push future changes.

Upvotes: 2

Related Questions