2 ms·
git checkout <file> to discard. This will checkout the full file to latest version tracked. Alternatively If you wanna save some of the file you can use git add
by K0nserv 11y ago
git checkout <file> to discard. This will checkout the full file to latest version tracked. Alternatively If you wanna save some of the file you can use git add -p <file> and stage the individual parts you want. After you've committed those you can checkout the file.
git rm <file> to delete something you've added accidentally