undo previous commit keep changes code example Example: undo last commit but keep changes git reset @~