View Single Post
Old 10-15-2014, 12:13 PM   #1050
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Yes. Rebasing will allow you to walk through each commit and change the metadata.

Code:
# Using "--root" is very important, you cannot simply specify the sha1 of the
# first commit, or it will start with the second commit
git rebase -i --root
:%s/pick/edit/g
:wq
git commit --amend --author="Adam Selene <>" && git rebase --continue
...
...
EDIT: Never mind, in my test it seems as though amending a commit makes it more fussy.
fatal: Malformed ident string: 'Adam Selene <> 1268438400 +0000'

EDIT #2: use this to "amend" a commit by undoing the commit, recommitting using the saved EDITMSG, then continuing rebase:

Code:
git undo-commit && git commit --author="Adam Selene <>" -m "$(cat .git/COMMIT_EDITMSG)" && git rebase --continue
...
...
Assumes you have created the following alias (should be git builtin):
Code:
# revert "git commit", leaving you with staged changes.
git config --global alias.undo-commit 'reset --soft HEAD^'

Last edited by eschwartz; 10-15-2014 at 12:42 PM.
eschwartz is offline   Reply With Quote