Home > OS >  Can I add --recurse-submodules to .gitattributes of a git repo?
Can I add --recurse-submodules to .gitattributes of a git repo?

Time:05-05

When working with git repos that use git submodules, people might forget to add --recurse-submodules to their git commands or might not think about setting git config --local submodule.recurse true locally for a repo. Can I somehow set this by a setting in the repository, e. g. in the .gitattributes file?

I just want to make sure that people do not have to think about if a repo contains submodules or not.

CodePudding user response:

No: for technical and security reasons, no configuration information is allowed here. Your best bet is to tell people not to run git clone at all: give them some program—such as a shell script—that runs whatever you want with whatever options you want.

  • Related