A submodule is an independent repository, stored somewhere else, just like a library would be. All that the super project needs to know is the commit object id that is the current reference version of the sub-module. The local git config(?) has details of where (remote server/path) that it can be found.
On Sunday, May 17, 2020 at 9:51:59 AM UTC+1, Nicola Cantalupo wrote: > > why when I add a submodule to my local repository and push to the remote > upstream, the name of the submodule folder change its name (*site @ > 0000xxx*)? and why does it point to the remote repository submodule? > > Il giorno venerdì 15 maggio 2020 11:11:04 UTC+2, Magnus Therning ha > scritto: >> >> >> Nicola Cantalupo <nicolac...@gmail.com> writes: >> >> > Good evening, >> > I am a beginner. >> > I have a repository on >> > GitHub https://github.com/mygithubusername/victor-hugo which I set to >> > private. >> > I think it's a fork (Correct me if I'm wrong) because I generated it >> from >> > here >> > >> https://app.netlify.com/start/deploy?repository=https://github.com/netlify/victor-hugo >> >> > Wanting to work locally on my computer, I have installed git and I am >> > currently using Git Bash on Windows. >> > >> > These are the commands I gave: >> > >> > git config --global user.name "Dippy Dawg" >> > git config --global user.email >> > "1234...@users.noreply.github.com" >> > git clone https://github.com/mygithubusername/victor-hugo >> > cd victor-hugo >> > cd site >> > git submodule add https://github.com/uicardiodev/hugo-sodium-theme >> > themes/sodium >> > >> > Let's admit that I made unspecified changes to various files and >> folders, >> > how do I update these changes also* on my repository on GitHub? >> > * Provided that the changes are also updated on the local repository, >> > because I'm not sure. >> >> Since pushing changes to the upstream (GitHub) repo is one of the most >> common operations you perform in git you'll find it in any tutorial >> worth its salt. >> >> There are numerous tutorials, I think the git documentation on GitHub is >> rather good (though sometimes not 100% clear on separating git-the-tool >> from GitHub-the-service). >> >> https://guides.github.com/introduction/git-handbook/ >> >> /M >> >> -- >> Magnus Therning OpenPGP: 0x927912051716CE39 >> email: mag...@therning.org >> twitter: magthe http://magnus.therning.org/ >> >> It is better to keep your mouth shut and appear stupid than to open it >> and remove all doubt. >> — Mark Twain >> > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/74f0f271-4c82-4139-89c1-ff07a4f0b13a%40googlegroups.com.