Skip to content

Instantly share code, notes, and snippets.

@1solation
Created February 21, 2024 10:30
Show Gist options
  • Save 1solation/9a08daac64a15b1924035dcc6b23d834 to your computer and use it in GitHub Desktop.
Save 1solation/9a08daac64a15b1924035dcc6b23d834 to your computer and use it in GitHub Desktop.
Uncommit local commit and restage changes

To uncommit your local commit (which has not yet been pushed to Github) and keep your staged changes use:

git reset --soft HEAD~1

This command will undo your last commit, but it will keep your changes and your staging intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment