Re:Things I wish everyone knew about Git (Part I)
by nemetroid on Wednesday June 29, 2022 @08:16PM
(#31927330)
Using the command specifically designed to permanently discard work seems ”very hard” to me.
[ Parent
| on HN ]
Re:Things I wish everyone knew about Git (Part I)
by Someone on Thursday June 30, 2022 @02:12AM
(#31929167)
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.