3 ms·
Basically, making `git reset --hard` and `git checkout -f` auto-stash would be great.
by cryptonector 4y ago
Basically, making `git reset --hard` and `git checkout -f` auto-stash would be great.
- chx 4y agoThat's what the script does for the first. Essentially.
- cryptonector 4y agoBut it could just be built in to Git. I mean: it should be.
- kjeetgill 4y agoIf I had to pick my version of this solution to fix 60% of git's learning curve problems: a) Don't tell people about stash. All Commits Everything. b) All commands that change the working directory or branches should fail on uncommitted work and ask you to git commit. It already does this for untracked changes. c) Show people show git branch BACKUP (requiring a commit) + git reset --hard BACKUP will always get you back to where you started safely.
- cryptonector 4y agoYes. Plus commands that alter dirty workspace files could just do a "stash" like thing.