Skip to content

Commit 89162d0

Browse files
committed
Remove some submodules
1 parent 0576ba4 commit 89162d0

7 files changed

+18
-17
lines changed

.gitmodules

-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
[submodule "demos/the-x-in-mdx"]
2-
path = demos/the-x-in-mdx
3-
url = https://github.com/pomber/the-x-in-mdx
4-
[submodule "demos/hooks-talk-demo"]
5-
path = demos/hooks-talk-demo
6-
url = https://github.com/code-hike/hooks-talk-demo
7-
[submodule "demos/swr-minidocs-demo"]
8-
path = demos/swr-minidocs-demo
9-
url = https://github.com/code-hike/swr-minidocs-demo
10-
[submodule "demos/nextjs-post-demo"]
11-
path = demos/nextjs-post-demo
12-
url = https://github.com/code-hike/nextjs-post-demo
131
[submodule "demos/react-tutorial-demo"]
142
path = demos/react-tutorial-demo
153
url = https://github.com/code-hike/react-tutorial-demo

demos/hooks-talk-demo

-1
This file was deleted.

demos/nextjs-post-demo

-1
This file was deleted.

demos/swr-minidocs-demo

-1
This file was deleted.

demos/the-x-in-mdx

-1
This file was deleted.

scripts/rm-submodule.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# from https://stackoverflow.com/a/7646931/1325646
4+
5+
# Remove config entries:
6+
7+
git config -f .git/config --remove-section submodule.demos/$1
8+
git config -f .gitmodules --remove-section submodule.demos/$1
9+
git add .gitmodules
10+
11+
# Remove directory from index:
12+
13+
git rm --cached demos/$1
14+
15+
# Delete unused files:
16+
rm -rf demos/$1
17+
rm -rf .git/modules/demos/$1

0 commit comments

Comments
 (0)