Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zlocate/f6e21affd575e7a7dffbfa205384e0fa to your computer and use it in GitHub Desktop.
Save zlocate/f6e21affd575e7a7dffbfa205384e0fa to your computer and use it in GitHub Desktop.
Use different emails for different git repositories

Edit ~/.gitconfig

[user]
        email = [email protected]
        name = Michael Hawkins
[includeIf "hasconfig:remote.*.url:[email protected]:YOUR_COMPANY_NAME/**"]
        path = ~/Documents/Projects/Work/.gitconfig

Edit ~/Documents/Projects/Work/.gitconfig

[user]
        email = [email protected]
        name = Michael Hawkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment