JetBrains IDEs also have the best UI I've come across for conflict merges.
I think it would be possible to solve these with git, by doing something like automatically running a `git stash --include-untracked` before an operation that can clobber untracked files.
`git add -p`: prompt which hunks should be added to staging
`git checkout -p`: prompt which unstaged hunks should be thrown away
`git checkout HEAD^ -p`: prompt which hunks from HEAD should be discarded
`git reset -p`: prompt which currently-staged hunks should be unstaged
`git reset HEAD^ -p`: prompt which hunks from the HEAD commit should be unstaged
Nice thing is that you get interactive yes/no prompts with a preview of the change for each hunk, and you can also quit early if you realize it's not the command you want.
Doesn't fully address the potential for lost changes, but slows it down by adding an interactive roadblock for each change.
1. a large piece of something, especially food, cut or broken off a larger piece.
I am the CTO of Tower, a Git client for Mac and Windows.
When I help people get started with git, I tell them several times to commit as often as they can. If they committed it, I can probably save them when they think they lost something.