Git – reverting a reverted commit If you’ve reverted a recent commit with: git reset HEAD^ You can undo the revert with this: git reset HEAD@{1}