Hacker News new | ask | show | jobs
by acjohnson55 4597 days ago
I guess maybe the counterargument is that perhaps this should happen invisibly and automatically.
2 comments

You just ran a script that scattered production / sensitive information in your source files. You definitely don't want to get that into history and get the last head state back.. Yes, you can delete the working tree and check out head again, but than again, git reset --hard pretty much does that and it's welcome at times.
Well, there is to my knowledge no other vcs that does this. Mercurial will hapily blow your changes away if you do a hg update -C. If you want your changes to stick around, you do a git stash first.