Skip to content

Instantly share code, notes, and snippets.

@condran
Created February 13, 2019 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save condran/8cd212cc3d262fed3e3ba3bcbd0e36aa to your computer and use it in GitHub Desktop.
Save condran/8cd212cc3d262fed3e3ba3bcbd0e36aa to your computer and use it in GitHub Desktop.
How to have conditional config for personal and work git user accounts https://dev.to/maxlmator/maintaining-different-git-identities
# ~/.gitconfig
[user]
name = Firstname Lastname
email = <private email address>
[includeIf "gitdir:~/Work/"]
path = .gitconfig-work
# ~/.gitconfig-work
[user]
name = Lastname, Firstname
email = <work email address>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment