git tips2

1 How do you discard unstaged changes in git?


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

http://stackoverflow.com/questions/52704/how-do-you-discard-unstaged-changes-in-git

你可能感兴趣的:(tips)