Skip to content

Instantly share code, notes, and snippets.

Discard unstaged changes

For a single file: git checkout path/to/file/to/revert

For all unstaged files: git checkout -- .

List all untracked files

git ls-files --others --exclude-standard