Remove last commit from local Git repository git reset HEAD^ Remove last commit from remote Git repository # remove commit locally git reset HEAD^ # force-push the new HEAD commit git push origin +HEAD Remove last commit from remote Git repository but keep it locally git push origin +HEAD^:<name of your branch, most likely 'master'> Clone recursively without history git clone --recursive --depth 1 -b master <repository url> Show commit history git log --pretty=format:"%h %ad [%an] %s" --date=short List stashes in all submodules git submodule foreach "git stash list"