You can find this question among the most popular Git interview questions. Git leverages your username for associating commits with a particular identity. The ‘git config’ command helps in changing Git configuration as well as your username. For example, if you want to have a username and email id for associating a commit with a particular identity, then you can use the following commands.
git config -global user. Name “Name” can add a username
git config -global user.email “E-mail Address” will add an email ID