Project Screenshot

Image generated with ChatGPT

Remove last commit

Published April 30, 2025 · 1 min read

This is a simple script to remove the last commit from a git repository.

git reset --soft HEAD~1

This will remove the last commit from the repository and keep the changes in the staging area.