4 ms·
It really isn't. git stash is the equivalent to saving your work somewhere else and getting a fresh copy.
by evandale 3y ago
It really isn't.
git stash is the equivalent to saving your work somewhere else and getting a fresh copy.
- Certhas 3y agoNo it's not. The recovery strategy when you've gotten your repo into aess is "wipe, clone, restore local backup, try the git thing again". But even then, what's the benefit of using a strange git command, which means I have to track another bit of state only visible to git, which can easily be misused (by applying the stash to the wrong commit), and anyway doesn't save the actual working directory I care about (untracked files), over simply making a file system copy?
- evandale 3y agoThe benefit of using a strange git command would be learning what a strange git command does and then it's no longer strange. You'll learn how to create, read, update, and delete that new bit of state in git. Then you won't have to wipe, clean, restore local backup, try the git thing again. You can start saving your work somewhere else, getting a fresh copy, and then try that git thing again when you know how git stash works. What you're proposing is like not learning how an incremental compiler works and suggesting to wipe, clean, restore local backup, try to compile the thing again to fix compile errors every time you have a compile error instead of learning how an incremental compiler works.