I'm currently working on 2 projects, which expect that I configure my local username and email with different data when I push to them.
for that I'm updaing my config all the time like:
git config --local user.email "namelastname@domain.com"
Since they are different repositories, is there a way I could define an local email for each repository?
Maybe in the .gitconfig?
解决方案
For just one repo:
git config user.name "Your Name Here"
git config user.email your@email.com
For (global) default email (which is configured in your ~/.gitconfig):
git config --global user.name "Your Name Here"
git config --global user.email your@email.com