[b]1 How do you discard unstaged changes in git?
[/b]
For a specific file use:
git checkout path/to/file/to/revert
For all unstaged files use:
git checkout -- .
Make sure to include the period at the end
[url]http://stackoverflow.com/questions/52704/how-do-you-discard-unstaged-changes-in-git[/url]
[/b]
For a specific file use:
git checkout path/to/file/to/revert
For all unstaged files use:
git checkout -- .
Make sure to include the period at the end
[url]http://stackoverflow.com/questions/52704/how-do-you-discard-unstaged-changes-in-git[/url]