4 ms·
I suspect that certain types of people (including myself, at times), actually want continuous backups being taken on the state of their working copy prior to ac
by ezyang 15y ago
I suspect that certain types of people (including myself, at times), actually want continuous backups being taken on the state of their working copy prior to actually performing a commit. Bugs or not, Git doesn't do very well with unversioned changes: an accidental 'git reset --hard' can easily blow out lots of work (happened to me), even if that was exactly what the command was supposed to do. The correct thing to do is commit early and commit often (git commit -am "Wibble"; git reset HEAD~ works well for me) but from a user experience standpoint this ought to be automatic.
- joeyh 15y agoYes, it would be nice to have the assurance that the WC state was stored in the reflog before every git command that could possibly change it. This would probably be a relatively easy patch to write, although it could also slow git down too much to be accepted.
- rcthompson 15y agoGit can do that, with a bit of help from your editor (assuming your editor is configurable enough, i.e. you use emacs or vi): https://github.com/bartman/git-wip https://github.com/bartman/git-wip