Git snapshot: take a snapshot and stash it without messing with your working tree
(cherry picked from commit 5b850667cde0add3c2808e8a1cc1dc4d6791e42a)