In How to store a git config as part of the repository? it is laid out how to create a custom git config and include it in the path for a single repo. The one issue I have with this is that the commands they outline – git config --local include.path ../.gitconfig
– seemingly need to be run every single time the repository is cloned in order to make use of the aliases within it.
Is there any way to make this a one-time command that gets run the first time a developer clones the repository from bitbucket, or to automate it so that it developers don’t have to do anything at all?
I understand the concerns about running scripts immediately after cloning and how they pose security risk, but for the sake of the question, please assume this isn’t something we are worried about at this moment.
TSG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.