Incident
This is really a must-have plot in the programmer version of horror movies: the local code that has been written for half a month and has not been submitted has been deleted! ! ! ah! ! ! ! ! ! ! ! ! ! !
Submit the code with the visualization tool of vscode today, and turn Pop Stash into Drop Stash…………………
rescue
At this time, of course, keep the scene of the crime, and then quickly ask Du Niang T┈T Du
Niang for the quick-acting heart-relief pills. The personal test is effective: How to restore the code after git stash clear/drop
Steps:
1. In the project folder Open git bash under;
2. Run the following command to view the latest stash ID:
git log --graph --oneline --decorate $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
3. To restore the stash content according to the stash ID, run the following command (equivalent to git stash pop in the normal process):
git stash apply stashID