discard the last commit git

Farhan Tanvir Utshaw
1 min readSep 6, 2020

Discard the last commit (all your work will be there, just the last commit will be cancelled)

git reset --soft HEAD~1

Ref: StackOverflow

--

--