MCPcopy
hub / github.com/antfu/skills / removeSubmodule

Function removeSubmodule

scripts/cli.ts:48–58  ·  view source on GitHub ↗
(submodulePath: string)

Source from the content-addressed store, hash-verified

46}
47
48function removeSubmodule(submodulePath: string): void {
49 // Deinitialize the submodule
50 execSafe(`git submodule deinit -f ${submodulePath}`)
51 // Remove from .git/modules
52 const gitModulesPath = join(root, '.git', 'modules', submodulePath)
53 if (existsSync(gitModulesPath)) {
54 rmSync(gitModulesPath, { recursive: true })
55 }
56 // Remove from working tree and .gitmodules
57 exec(`git rm -f ${submodulePath}`)
58}
59
60interface Project {
61 name: string

Callers 2

initSubmodulesFunction · 0.85
cleanupFunction · 0.85

Calls 2

execSafeFunction · 0.85
execFunction · 0.85

Tested by

no test coverage detected