From 503b98906c64e26fe9c4b0308a83866eb6a1bf69 Mon Sep 17 00:00:00 2001 From: Dominic Reich Date: Tue, 13 Dec 2022 06:38:30 +0100 Subject: [PATCH] update post style/format (codeblocks) --- .../index.md | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/content/posts/2022-11-26-change-git-submodule-url/index.md b/content/posts/2022-11-26-change-git-submodule-url/index.md index cf80f43..a4cb8d0 100644 --- a/content/posts/2022-11-26-change-git-submodule-url/index.md +++ b/content/posts/2022-11-26-change-git-submodule-url/index.md @@ -3,7 +3,7 @@ title = "Change git submodule URL" summary = """Another thing I forget constantly when using git: Changing the remote URL of a submodule""" date = "2022-12-01T20:08:17+01:00" -#lastmod = "" +lastmod = "2022-12-13T06:37:11+01:00" categories = ["computerstuff"] tags = ["til-git","reminders"] @@ -12,10 +12,29 @@ tags = ["til-git","reminders"] If the location (URL) of the submodule has changed, then you can simply: 1. Modify the .gitmodules file in the repo root to use the new URL. -2. Delete the submodule folder in the repo `rm -rf .git/modules/`. -3. Delete the submodule folder in the working directory `rm -rf `. -4. Run `git submodule sync`. -5. Run `git submodule update`. +2. Delete the submodule folder in the repo + + ~~~console + $ rm -rf .git/modules/ + ~~~ + +3. Delete the submodule folder in the working directory + + ~~~console + $ rm -rf + ~~~ + +4. Run + + ~~~console + $ git submodule sync + ~~~ + +5. And run + + ~~~console + $ git submodule update + ~~~ More complete info can be found elsewhere: