Skip to content

Instantly share code, notes, and snippets.

View SigBaldi's full-sized avatar
💭
Some people get confused when a sentence doesn't end as they potato!

Daniele Baelde SigBaldi

💭
Some people get confused when a sentence doesn't end as they potato!
View GitHub Profile
@SigBaldi
SigBaldi / stash-pop-recover
Created June 5, 2020 14:02 — forked from davidwalter0/stash-pop-recover
Undoing accidental git stash pop
# https://stackoverflow.com/questions/6543519/undoing-accidental-git-stash-pop
# https://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git
accepted
If you have only just popped it and the terminal is still open, you will still have the hash value printed by git stash pop on screen (thanks, Dolda).
Otherwise, you can find it using this for Linux and Unix:
git fsck --no-reflog | awk '/dangling commit/ {print $3}'
and for Windows:
@qmmr
qmmr / learnThemByHeart.js
Last active February 6, 2018 09:59
Tips & Tricks of JavaScript
/* Collection by Marcin Kumorek © 2013 */
/* falsy values */
/*
null
undefined
''
0
NaN
false