Guide for windows. Should apply similarly elsewhere. We will use SSH. If you only care about github, check these out: cli/cli#326 & https://github.com/cli/cli/releases/tag/v2.40.0.
When making a commit, the username and email tagged with the commit are the ones specified in git config user.name
and git config user.email
. For github at least (but probably for everything else as well), your email is used as your identifier, which connects you as the commit author to your profile on the hosting service.
I like to keep my email private, so the email I connect with my commits to github projects with is the noreply one provided by github. It can be found in github -> Settings -> Emails
and looks like [email protected]
the number at the beginning being the essentially only important part. If you change the name after the +
, github will still recognize it as you, as long as the numbers ar