9

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?

Stefan27
  • 845
  • 8
  • 19

1 Answers1

24

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

Stefan27
  • 845
  • 8
  • 19