A blog about Swift and iOS tricks

Easily undo a local commit in Git

An easy to remember way for deleting or undoing the last commit from your local Git repository

# Make global configuration to set a delet-last-commit alias 
$   git  config  -- global  alias.delete-last-commit  "reset --soft HEAD ~1"

# Usage :)
$   git delete-last-commit