Hacker News new | ask | show | jobs
by Someone 1457 days ago
But it’s inconsistent in that. git checkout existing_branch complains with “error: Your local changes to the following files would be overwritten by checkout”* and abort, git checkout existing_directory overwrites files.

That’s what makes it easy to make that mistake, and lose data. It’s safe to use until it suddenly isn’t.

1 comments

I just don't understand why someone would do git checkout existing_directory if they don't want to overwrite files, since that is all the command does.