I have a GitHub repository for my university project. (I have a specific global user name which is not match my real name.) I don't want to change my GitHub user name, and my global git settings. For that project, I want to push an alternative user name, and only for a specific university project.
So if I see the git commits on every branch I want to see that John Doe<JohnDoe@uni.com> committed not john1819 like my other projects.
I have already tried other solutions from Stack Overflow like:
$ git config user.name John Doe
$ git config user.email JohnDoe@uni.com**
This is not a good solution for me,
$ git config --global user.name "John Doe"
$ git config --global user.email JohnDoe@uni.com
I think because it changes the global config.