You have several github profiles for different uses. For example, one account used privately and another account used professionally. Instead of switching profiles all the time which might be error prone, we can setup different git profiles for each folder.
Go to your user home folder. Open .gitconfig
, edit and add includeIf
which points to private.gitconfig
.
Create private.gitconfig
and add your github name and email as below.