How to reset the axis of mesh rotated in edit mode?
You may Snap Faces in object mode which can cause a rotation.  

You may create an Orientation. And Transform the orientation.

https://www.youtube.com/watch?v=Gc8BekthXAQ

There are also add-ons. You will still have to do some work. Probably scripts exist as well.  I can make no statements about 2.8.

Once the axis is reset, you need to select two faces source and destination.  Then you have the freedom to select location in the orientation and rotation along z-axis of local transform orientation.  The requirement of artistic/technical freedom requires some small amount of work from the Blender User.

You can make changes in edit mode, then go to object mode, then enter edit mode and undo those changes with the typical keystrokes of Control-Z.  I suggest you test it because I would use that feature rarely.  I would not perform hundreds of useful things and then undo in edit mode.