Before we jump into solutions, let’s find out what exactly it is you want to accomplish:
a) Change the author information before making a commit
b) Change the author information after making a commit (i.e. for historical commits)
Let’s look at both cases in detail.
Changing Your Git Author Identity
There are three ways to change your committer identity in Git. All of these methods only affect future commits, not past ones!
Changing Your Committer Name & Email Globally
You can run the “git config” command with the –global flag; this will make sure all of your future commits use the given information:
Changing Your Committer Name & Email per Repository
If you want to use special settings only when working in a certain repository, you can simply omit the –global flag. This makes the configuration valid only in thatrepository: