How in git to set different local repositories different user.name and user.email?

For example, there are folders

C/First/ C/Second/ 

I want the code to go to the First folder in Git bash and make commits, then commits and all manipulations are done from one user. And when I switch to the Second folder in Git bash and manipulate it, they are saved under a different "user".

    1 answer 1

    True assume it is in the local config. You can set a name and mail in it like this:

     $ git config --local user.name "John Doe" $ git config --local user.email johndoe@example.com