19

I wanted to edit one answer, but it turns out I had several tabs opened, and I didn't realize what I was doing until it was too late, and I edited the wrong answer from another page.

Now the modification has been recorded. The only way I found to undo my changes was to rollback, but then it counts as an extra commit in the answer revision log, and it still tags it with "edited by [me] [x] sec ago".

Was there a way to completely remove my edit from the commit list instead of applying a rollback?
I immediately recognized my error, if that's relevant.

Is the original author of the answer going to be notified of an edit of his question and waste time trying to understand what happened?

1
  • 10
    In other words, you want git reset --hard HEAD~, not git revert HEAD? ;-) Sorry, Stack Overflow doesn't allow pushing with --force. ;-P
    – Ajedi32
    Commented Aug 17, 2015 at 18:05

1 Answer 1

31

No, there is no way to pretend you never did anything, and that's .

You can manually undo all your changes in the grace-period though, which changes the empty revisions edit-summary to [Edit removed during grace period].
Currently, the edit-notification is not squashed, for whatever reason.

Why a rollback to the pre-edit version in the grace-period doesn't have the same effect as manually undoing every change? The devs just didn't program that...
... and now I posted a to change that, because I see it as sub-optimal:
Let's be smarter when rolling back in the grace-period

1
  • 3
    Fascinating, I had no idea that re-editing to remove your edits did that within a grace period. Commented Aug 17, 2015 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .