Skip to content

Instantly share code, notes, and snippets.

@gunjanpatel
Last active February 14, 2023 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gunjanpatel/7d7ae8cc634936ef1aadc693722516af to your computer and use it in GitHub Desktop.
Save gunjanpatel/7d7ae8cc634936ef1aadc693722516af to your computer and use it in GitHub Desktop.
Undo / Revert last commit while keeping files in stage

Here is how you undo your last commit and keep the changes from last commit files in stag or uncommited.

reset --soft HEAD^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment