how to clear coomits on git code example Example: remove the commit from local git reset --soft HEAD~1