If a buffed unit dies, does it keep the buff if it gets revived?
No, a revived unit does not keep its buffs.
According to Rule 705: "If a Unit leaves play, remove all Buffs from it."
When a unit dies, it moves from the battlefield to the trash (a non-board zone), which causes it to leave play. Consequently, all buffs are removed from the unit at that time. When the unit is later revived (brought back into play), it enters as a fresh copy of that card without any of the buffs it previously held.