remove last git push

Show last commit comment first:
git log –name-status HEAD^..HEAD

Then, remove the last commit and push:
git reset –hard HEAD~1

See also: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

2 thoughts on “remove last git push

  1. Or to list changes:
    git log –oneline –name-only master..branchname | sort | uniq

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.