If you want to make Git commits with a specific name and email for all repositories placed inside a directory, i.g. a /personal
directory on your company's computer, here is how to do.
-
In the
personal
directory, create a.gitconfig
file.[user] name = Your Name email = your.email@mail.com
-
In your
$home
, edit the.gitconfig
file to add these lines:[includeIf "gitdir:path/to/personal/"] path = path/to/personal/.gitconfig