I wanted to change the details of committer of previous commits. Porblem is when I tried to change, I see duplicate commits with from both user name.
Here is the full story. I created a repository on GitHub. I cloned that repo on my machine with git clome command. I had recently formatted machine, however I copied SSH keys from old machine and I thought it would work (I did not know about setting up git config command). I started working on project, made some commits. When I saw why my commits are not showing on github contributions, I saw in commiiter details that it was not considering my GitHub user details. I googled up and saw this solution and ran the same, running on master (instead of HEAD).
Now I see duplicate commits, same commit message from both username. Here is the screenshot :

I do have back up of whole thing before I tried to run the script.
- Did I do any mistake in running that command? If yes, I can try running it on my back up copy. If it fixes the problem, then how do I push it on github? 
- Now with the current one, which has duplicate commit details, how do I remove them and fix it? 
Following is the command I ran from that link:
git filter-branch --commit-filter '
        if [ "$GIT_COMMITTER_NAME" = "avi" ];
        then
                GIT_COMMITTER_NAME="avinassh";
                GIT_AUTHOR_NAME="avinassh";
                GIT_COMMITTER_EMAIL="email which I use for GitHub";
                GIT_AUTHOR_EMAIL="email which I use for GitHub";
                git commit-tree "$@";
        else
                git commit-tree "$@";
        fi' HEAD
 
     
    