Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Jeff is quite right, the right track is git filter-branch. It expects a script that plays with the environment variables. For your use case, you probably want something like this:</p> <pre><code>git filter-branch --env-filter ' if [ "$GIT_AUTHOR_NAME" = "Niko Schwarz" ]; then \ export GIT_AUTHOR_NAME="Jon Doe" GIT_AUTHOR_EMAIL="john@bugmenot.com"; \ fi ' </code></pre> <p>You can test that it works like this:</p> <pre><code>$ cd /tmp $ mkdir filter-branch &amp;&amp; cd filter-branch $ git init Initialized empty Git repository in /private/tmp/filter-branch/.git/ $ $ touch hi &amp;&amp; git add . &amp;&amp; git commit -m bla [master (root-commit) 081f7f5] bla 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 hi $ echo howdi &gt;&gt; hi &amp;&amp; git commit -a -m bla [master a466a18] bla 1 files changed, 1 insertions(+), 0 deletions(-) $ git log commit a466a18e4dc48908f7ba52f8a373dab49a6cfee4 Author: Niko Schwarz &lt;niko.schwarz@gmail.com&gt; Date: Thu Aug 12 09:43:44 2010 +0200 bla commit 081f7f50921edc703b55c04654218fe95d09dc3c Author: Niko Schwarz &lt;niko.schwarz@gmail.com&gt; Date: Thu Aug 12 09:43:34 2010 +0200 bla $ $ git filter-branch --env-filter ' &gt; if [ "$GIT_AUTHOR_NAME" = "Niko Schwarz" ]; then \ &gt; export GIT_AUTHOR_NAME="Jon Doe" GIT_AUTHOR_EMAIL="john@bugmenot.com"; \ &gt; fi &gt; ' Rewrite a466a18e4dc48908f7ba52f8a373dab49a6cfee4 (2/2) Ref 'refs/heads/master' was rewritten $ git log commit 5f0dfc0dc9a325a3f3aaf4575369f15b0fb21fe9 Author: Jon Doe &lt;john@bugmenot.com&gt; Date: Thu Aug 12 09:43:44 2010 +0200 bla commit 3cf865fa0a43d2343b4fb6c679c12fc23f7c6015 Author: Jon Doe &lt;john@bugmenot.com&gt; Date: Thu Aug 12 09:43:34 2010 +0200 bla </code></pre> <p><a href="http://www.markus-gattol.name/ws/scm.html#sec37" rel="nofollow noreferrer">Please beware. There's no way to delete the author's name without invalidating all later commit hashes. That will make later merging a pain for people that have been using your repository.</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload