The beautifulhugo theme this site uses was pinned to a particular branch and was not being updated to the latest version, so these are my notes on switching it to master
There had been updates on the official site and yet the theme inside the submodule was not updating; I wondered why, and it turned out to be because it was on a specific branch. (I thought I had set it to master when I first installed it…?)
Checking the submodule branch
Here, /scribble is the parent Hugo site
$ pwd
/scribble
$ git submodule status
07f765675dab2b00ad39aa460118edff2f2d3fcd themes/beautifulhugo (07f7656)Switching the branch to master
$ cd themes/beautifulhugo
$ git checkout master
Previous HEAD position was 07f7656 Merge pull request #269 from VincentTam/fix-dotHugo-deprecated
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
$ cd ../../
$ git submodule status
+1ff3894b84b1802433b58e22dd22f4eb46a49fa9 themes/beautifulhugo (heads/master)Changes in the main repository
$ cd /scribble
$ git diff
diff --git a/themes/beautifulhugo b/themes/beautifulhugo
index 07f7656..1ff3894 160000
--- a/themes/beautifulhugo
+++ b/themes/beautifulhugo
@@ -1 +1 @@
-Subproject commit 07f765675dab2b00ad39aa460118edff2f2d3fcd
+Subproject commit 1ff3894b84b1802433b58e22dd22f4eb46a49fa9
$ git add themes/beautifulhugo
$ git commit -m "update submodule"
[master 190d53b] update submodule
1 file changed, 1 insertion(+), 1 deletion(-)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 291 bytes | 291.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To https://gitlab.com/xxxxx/scribble.git
7705617..190d53b master -> masterThis time it was a git branch change for the Beautiful theme, but other themes can be updated with the same steps
Reference article
- gitのサブモジュールにて特定のブランチやコミットを使用する | ハックノート (in Japanese)