简体   繁体   中英

Git submodule push when it is a GitHub library?

I added a GitHub-based library as a submodule and modified it. I need to share the modification with my teammates.

  • I won't be able to push it to submodule's GitHub origin, would I?
  • How do I share the modification?
  • I'm not supposed to modify submodules which I get from GitHub?
  • I won't be able to push it to submodule's GitHub origin, would I?

No: you need to fork that GitHub project first, and add that fork as a submodule.
(or change the current submodule url by the one of your fork )

  • How do I share the modification?

Once you have added your fork as a submodule, you will be able to push modification to its upstream repo.

  • I'm not supposed to modify submodules which I get from GitHub?

Submodule or not, you cannot modify GitHub repos you are not the owner (or a declared collaborator) of.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM