0

I am working on a project that is in github for a client, using my professional email address.

I have been committing and doing some work properly, until recently I had changed the global config of git on my machine to my personal email and by mistake uploaded two commits into github using that identity. After which I changed the git id to my professional id and uploaded a third commit that has my professional credentials.

I do not want any commits on github that have my personal id but my professional one. how can I do that?

Huang
  • 1,355
  • 2
  • 11
  • 28
  • 4
    possible duplicate of [Change the author of a commit in Git](http://stackoverflow.com/questions/750172/change-the-author-of-a-commit-in-git) – neshkeev Aug 18 '15 at 16:59

2 Answers2

0

On your file .gitconfig you can configure the user you want to use.

For example I have :

[user]
    name = Franck 
    email = franck@gmail.com

You can add these by doing:

git config --global user.name "Franck"
git config --global user.email "franck@gmail.com"
Franck
  • 1,354
  • 12
  • 17
0

Git came up with a script that will do what you are trying to do, it can be found here: https://help.github.com/articles/changing-author-info/

That site has a 7 step process of changing the author of commits, otherwise you can try to just use the git filter-branch command on your own, but be careful!

Josh
  • 491
  • 3
  • 7