“Many rank-and-file engineers have stories about submitting their resignation, or threatening to quit, and their managers plying them with stock or cash or promotions to stay.”
I’ve had this happen to me three times. One worked out really well, and we were both happy for years after. One worked out ok, but didn’t last as long. One left both sides less happy (but with me earning much more and the company keeping me for a while longer).
A lot of good advice (for both sides) in this long post on how long to stay, and how hard to work to retain.