19 ms·
> Aside: This is when git started performing destructive actions without warning Is there anything truly destructive in git though? Unless there's a GC, you ca
by rootlocus 9y ago
> Aside: This is when git started performing destructive actions without warning
Is there anything truly destructive in git though? Unless there's a GC, you can still recover any unreferenced objects.
- gsylvie 9y agoYou cannot recover your unstaged changes if you happen to toast them with "git checkout --".
- deleted 9y ago[deleted]
- Karunamon 9y agoNot if they were never committed in the first place. It sounds like if you made changes without committing them (new files or modified committed files), and then branch switch, that content is gone with no warning.
- rootlocus 9y agoGit usually aborts any checkouts or merges that destroy the working directory. You can however use `git reset --hard HEAD` (which I aliased nuke) and it will happily oblige.
- hlieberman 9y agoOnly if it's been committed once. If it's untracked when you wipe it away, it's gone.
- deleted 9y ago[deleted]