• thebestaquaman@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    3 hours ago

    Got will not delete untracked files though, which is what happened here. If you want to discard changes to a file with git, you first have to commit the file to the index at some point, which means there’s only ever so much damage an erroneous “git restore” or “git reset” can do. Specifically, neither of them will delete all the files in an existing project where VC has just been added.