ive reset my git to previous coomit but hasnt done it code example Example: reset last commit without losing changes git reset HEAD~1 --soft