book icon indicating copy to clipboard operation
book copied to clipboard

chore: explain what `forge remove` does more specifically

Open PaulRBerg opened this issue 3 years ago • 3 comments

Removing a git submodule properly involves quite a few steps:

# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule

# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule

# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f path/to/submodule

It would be helpful to mention whether forge remove performs all of the steps above, or just a combination of them, in the Removing dependencies section.

PaulRBerg avatar Jul 17 '22 08:07 PaulRBerg

This is better suited for the command reference if anywhere

onbjerg avatar Jul 17 '22 14:07 onbjerg

Oh, yes. Should we move this to the foundry repo?

PaulRBerg avatar Jul 18 '22 14:07 PaulRBerg

So according to my understanding forge remove does not perform the first command i.e. remove the submodule entry from .git/config. But it performs the other two commands removing the submodule directory from .git/submodules and remove the entry in .gitmodules.

So does this issue require any changes to be made to the foundrybook documentation? I would like to help, thank you.

Learnedprawn avatar May 11 '25 10:05 Learnedprawn