Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Undo Drop Stash

By mistake I pressed on drop and now I dont have my changes is there any way to bring the dropped stash in Visual Studio?

  1. I did changes to the project
  2. I stashed the changes
  3. I pulled code from the remote repo
  4. I pressed on Drop in the stash menu

How to undo the drop?


1 Answers

This is what worked for me:

Answer here: How to recover a dropped stash in Git?

  1. In the project folder right mouse click and click on Gitbash here enter image description here

  2. In the GIT console window: git fsck --no-reflog | awk '/dangling commit/ {print $3}'

  3. gitk --all $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

  4. Right Click on the commit and click new Branch enter image description here

  5. Now in Visual Studio the new branch can be opened and inspect the code enter image description here


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!