Pages

Tuesday, June 8, 2021

Git : How to recover your files after an improper handling ?

This small reminder permits to recover your project files very quickly without making an git clone.
For example, I use it if I delete files.

First stash your modifications :

git stash save "Bad manip"

git stash list

stash@{0}: On master: Bad manip
stash@{1}: On master: Menu publication

Then, you can delete your bad stash :

git stash drop stash@{0}

Dropped stash@{0} (838f86a5ea1ebb875f34adb1dd6fda9f1b6c89c3)

git stash list

stash@{0}: On master: Menu publication

That's all !

Feel free to comment.


GIT : version 2.17.0.windows.1

No comments:

Post a Comment

Débutez en crypto-monnaie de manière ludique avec les projets "Move to earn"

Les projets "Move to earn" sont des projets très en vogue en ce moment dans le monde de la crypto-monnaie. Le principe est simple ...