Interview Prep/Git & GitHub/Commits, branches and tags

How do you set committer identity per repository or per directory?

IntermediateConceptCommits, branches and tags
Answer

Set user.name and user.email locally, or use conditional includes in the global config so work and personal repos pick different identities automatically.

# ~/.gitconfig
[includeIf "gitdir:~/work/"]
    path = ~/.gitconfig-work
All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags