Skip to content

Instantly share code, notes, and snippets.

@stefanofiorentino
Created May 6, 2020 13:05
Show Gist options
  • Select an option

  • Save stefanofiorentino/4e4bdf7e09c9fffa32b2003a6aaadfdd to your computer and use it in GitHub Desktop.

Select an option

Save stefanofiorentino/4e4bdf7e09c9fffa32b2003a6aaadfdd to your computer and use it in GitHub Desktop.

Revisions

  1. stefanofiorentino created this gist May 6, 2020.
    9 changes: 9 additions & 0 deletions git filter-author
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/bash

    OLDSIGNED="stefano.fiorentino@home"
    OLDNAME="Fiorentino Stefano"
    NEWSIGNED="stefano.fiorentino@work"
    NEWNAME="Stefano Fiorentino"

    git filter-branch --msg-filter 'sed "s/'"${OLDSIGNED}"'/'"${NEWSIGNED}"'/g"' "$@"
    git filter-branch --msg-filter 'sed "s/'"${OLDNAME}"'/'"${NEWNAME}"'/g"' "$@"