Git log -graph -oneline -decorate ( git fsck -no-reflog | awk '/dangling commit/ ' ) What's the "new-val" and "old-val" - values of what? Is refs/stash the refname? Or is the sha the refname? no-deref update not the one it points to Git update-ref refs/stash b68ecd901f90158d7c41edf2d2d3868e3599ca29 -create-reflog -m "My recovered stash"īoth give usage (below, removing the '-d' and '-stdin' stuff: If you have any stash hint or experience that you want to share, comments are welcome. Using the Git Flow method at work, this could have come to my mind before encountering a painful experience. This seems obvious but it only comes to me as I was finding a way to recover a stash: maybe I should use temporary branches instead of stashes. Unlike git stash pop, git stash apply does not remove the stash from the list of stashes, which can avoid some loss.įinally, I’d recommend to avoid git stash. The well-known SourceTree succeeds at showing unnamed stashes, but as you can guess, the list isn’t friendly to browse:.That’s probably why you can’t create a stash in GitUp without giving it a name, which is great! GitUp, the Git client I use, completely fails at showing unnamed stashes.If your Git isn’t in English, you’ll have to run alias git='LANG=en_GB git' each time you want to recover a set of stashes (thanks mathieuschopfer).Īlways use a commit message using git stash save -m "My commit message": without message, the only informations helping to identify a stash are its timestamp and the branch it was saved from, which may not be enough compared to a strong explicit name. Enter fullscreen mode Exit fullscreen mode
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |