Lets say that I've different projects with different credentials and configurations specific to each one of them.
I'm using --global
to set the configurations for the project I use the most but, for all the other projects I need to manually get into the repositories and update those individual configurations for email, name, GPG signatures and so on.
I've written some scripts to automate this configuration process for each individual configuration set, but now I need to remember to run those scripts every time I clone a new repository. And it gets even worse if those repositories have submodules in them.
Is there a way to solve this problem and automatically run the correct script when I clone a repository? I was thinking about linking it with the Organization
name in the URL of the repository, but I couldn't quite get the idea on how to do it.