shou2017.com
JP

Removing git submodules

Sun Mar 18, 2018
Sat Aug 10, 2024
Git

Hugo themes are managed using git submodule.

However, managing git submodule can be cumbersome.

In such cases, you can integrate the submodule as follows:

$ git rm --cached themes/hugo-theme-even
rm 'themes/hugo-theme-even'
$ git rm .gitmodules
rm '.gitmodules'
$ rm -rf themes/hugo-theme-even/.git
$ git add -A
$ git commit -m "Integrated submodule"

This process is quite tedious.

Ideally, it would be nice to handle this elegantly from the terminal.

I should learn git properly. Maybe start with a comic book.

改訂2版 わかばちゃんと学ぶ Git使い方入門

See Also