#windows git reset --soft HEAD~1
Here is what the above code is Doing:
1. git reset –soft HEAD~1
– This will reset the current branch to the commit before the last commit.
– The –soft flag will leave the working directory unchanged.
2. git stash
– This will stash the changes in the working directory.
3. git stash drop
– This will drop the most recent stash.