By default when you begin editing an fcurve, a "snapshot" of the curve's original shape is taken, which is called a buffer. This buffer preserves a temporary copy of the original fcurve until you are satisfied with the new, edited version.
When you are satisfied with the new fcurve, you can save a buffer of the newly edited curve and continue editing; otherwise, you can swap the new fcurve with its buffer to undo your changes.
Buffer curve is ghosted with a dotted line, displaying the fcurve's previous shape before editing. Curve's current shape is in white (selected).
Make sure that the View Buffer Curves option is active. You can also select it on the View tab in the Fcurve Editor Preferences property editor.
If you are satisfied with the edited curve, accept its new shape by choosing Edit Save Buffer, or by clicking its icon on the toolbar if you're in Classic mode.
The buffer curve takes the fcurve's current position, and the old buffer is overwritten.
Swapping an Edited Fcurve with Its Buffer
Make sure that the View Buffer Curves option is active. You can also select it on the View tab in the Fcurve Editor Preferences property editor.
To return the edited fcurve to its previous position as defined by the buffer curve, choose Edit Swap Buffer, or click its icon on the toolbar if you're in Classic mode.
To clear the buffer curve, turn off the View Buffer Curves option.