I have complex problem/case connected with git submodule. I have my own repo on github and third-party submodule (provided by other company, READ ONLY). I dealt with init submodule, update it, add .gitsubmodule and new folder to master repo, etc. - all is working right. Now I want make some changes in submodule files, add new files to submodule or something like that. I did it and then I executed commit from submodule directory level. I changed folder to master repo and git status shows me uncommited commits at submodule folder. So... git commit -a
, git push
. (When I'm checking git status in submodule directory I'm getting info that Your branch is ahead of 'origin/master' by X commits.)
When I make recursive clone of my repo from github I'm getting error (I suppose caused by changes in submodule):
fatal: reference is not a tree: c19485a57b5152959b9a916409ad5d901c44741d
Unable to checkout 'c19485a57b5152959b9a916409ad5d901c44741d' in submodule path 'apt'
So, my questions are:
- Can I doing changes in submodule and pushing them (and tracking) to github.
- If yes, what I must do that I will could pull all my repo with submodules and changes within it to another host (some workflow?).
- If not, how I can circumvent doing changes in submodule with seeing them from my github repo level and pulling to another host
- It is at all possible?