0

Earlier today, following the instruction on this previous stackoverflow thread, I carelessly ran the following bit of code:

git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail';

And in doing so, I overwrite my coworker's 4048 commits on my particular branch. I attempted to

git reset --hard HEAD

But this does not undo my author overwrite. Is there anyway for me to undo this commit thievery?

Community
  • 1
  • 1
  • 1
    I was able to reset this to the previous author listing by following the directions here: http://stackoverflow.com/questions/9210446/replace-local-branch-with-remote-branch-entirely git reset did not work by itself to replace the original author content. I had to delete my branch, and repull it, and then refetch it to restore the author content. – Isto Barton Oct 06 '15 at 21:19
  • Filter branch makes a backup of your original refs in refs/original. You needed to `git reset --hard refs/original/YOUR_BRANCH`. – Andrew C Oct 06 '15 at 23:57
  • 1
    Possible duplicate of [Undo git filter-branch](http://stackoverflow.com/questions/14542326/undo-git-filter-branch) – Andrew C Oct 07 '15 at 15:36

0 Answers0