Discard Git Stash Pop

This has already been asked and answered on stackoverflow (see How to revert Git repository to a previous commit?), but the simple answer is:

git reset --hard HEAD

This should take care of your problem. Note that this removes all uncommitted changes from the repository.

Note that if there are conflicts, the stash is preserved. From the stash docs:

Applying the state can fail with conflicts; in this case, it is not
removed from the stash list. You need to resolve the conflicts by hand
and call git stash drop manually afterwards.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)