Quantcast
Viewing all articles
Browse latest Browse all 52

Answer by Abhi for How to recover a dropped stash in Git?

You can achieve this in 2 easy steps

  1. List lost stashes--> run this command for a project where all stashes were trashed:

    git fsck --unreachable | grep commit | cut -d '' -f3 | xargs git log--merges --no-walk

  2. Send a lost stash back where it comes from -->Let’s use the commit hash of the second stash:

    git update-ref refs/stash 4b3fc45c94caadcc87d783064624585c194f4be8 -m"My recovered stash"


Viewing all articles
Browse latest Browse all 52

Trending Articles



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