git submodule is powerful to control repositories and easy to use, but how to add it to project?
For example, my hexo project want to add theme hexo-theme-melody with Netlify, somehow you don’t put all files in project, you need update it, use
submodule to do it.
.gitmodules file in your project dictionary, next, you should add belong:
path = themes/melody
url = https://github.com/Molunerfinn/hexo-theme-melody.git
$ git submodule update –init
If you got any erros, you should remove cache.
$ git rm –cached probberechts/hexo-theme-cactus