git change all history for committers names and email for specific committer

How i cant change the name and email for all my commits history but for and specific commiter..

something like, foreach allcommits if committer_name = “Hugo Casa”
change :

  • Uniquely reference a commit in Git when history changes
  • how to add multiple files in git at the same time
  • Is there a way to just commit one file type extension from a folder?
  • What should be in a first commit?
  • How do I checkin to local copy AND svn:externals subdirectories in one commit?
  • YouTrack commands stripped from GIT commit messages
  • and after do this,
    push and refresh the data of the history.

    please helppp i search and found this:

    git filter-branch --commit-filter '
            if [ "$GIT_COMMITTER_NAME" = "production251" ];
                    GIT_COMMITTER_NAME="Hugo Casanova";
                    GIT_AUTHOR_NAME="Hugo Casanova";
                    git commit-tree "$@";
                    git commit-tree "$@";
            fi' HEAD
    git filter-branch --env-filter '
        oldname="(old name)"
        oldemail="(old email)"
        newname="(new name)"
        newemail="(new email)"
        [ "$GIT_AUTHOR_EMAIL" = "$oldemail" ] && GIT_AUTHOR_EMAIL="$newemail"
        [ "$GIT_COMMITTER_EMAIL" = "$oldemail" ] && GIT_COMMITTER_EMAIL="$newemail"
        [ "$GIT_AUTHOR_NAME" = "$oldname" ] && GIT_AUTHOR_NAME="$newname"
        [ "$GIT_COMMITTER_NAME" = "$oldname" ] && GIT_COMMITTER_NAME="$newname"
        ' HEAD

    but…after that :
    write: git log –pretty=format:”%an” | sort -u
    and the name of production251 show ..

    i found new code:

    git filter-branch –force –env-filter ‘
    if [ “$GIT_COMMITTER_NAME” = dmiguel” ];
    GIT_COMMITTER_NAME=”Diana Miguel”;
    GIT_AUTHOR_NAME=”Diana Miguel”;
    fi’ — –all

    this is well? or not? after put this code on terminal (ubuntu), need some code adittional?, push or something?

  • view the change history of a file using
  • Add git hook to repo
  • Git - separate folder for each branch. Setting it up
  • Why do I constantly have to enter my passphrase in SSH
  • How to commit changes to git in Concourse build?
  • Moving from one git branch to another and applying only my changes
  • One Solution collect form web for “git change all history for committers names and email for specific committer”

    You are losing the values you set for GIT_COMMITTER_NAME and the others between when you set them and when you execute git commit-tree. You either need to make it all on the same command line or use export in front of them.

    Git Baby is a git and github fan, let's start git clone.