Quantcast
Viewing latest article 1
Browse Latest Browse All 52

Answer by anapsix for How do I recover a dropped stash in Git?

Knowing the approximate file name and it's location, and was able to find dropped stash files grepping dangling commits for path

for i in $(git fsck --no-reflogs | awk '/dangling commit/ {print $3}'); do  if git log -5 --name-only -u $i | grep -q "<path-to-files>/.*<partial-file-name>.*"; then    echo "found something in commit $i";  fi;done

Viewing latest article 1
Browse Latest Browse All 52

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>