I want to make a Python package out of a repository that I've added as a submodule to my repository. Is there a way to add a __init__.py
file to this submodule and to track it in the parent repository?
Asked
Active
Viewed 5,505 times
1

Jonathan Leffler
- 730,956
- 141
- 904
- 1,278

Lenar Hoyt
- 5,971
- 6
- 49
- 59
1 Answers
2
If you add any file in that submodule repo, you will have to:
- add, commit and push from that submodule repo (assuming you have the right to push to its upstream repo. If not, you need to change the remote url of that submodule by one representing a fork that you own)
- go back to the parent repo, add, commit and push: the parent repo will tack the new submodule SHA1 (new state of its tree). That SHA1 is called the gitlink (a special entry in the parent repo index)