Standard Posted by Dave Cho Posted on November 6, 2013 Posted under Git Comments Leave a comment Discard unstaged changes in git For a specific file use: $ git checkout path/to/file/to/revert For all unstaged files use: $ git checkout -- . Don’t forget to add ‘.’ at the end. Advertisements Like this:Like Loading... Related discardgitunstaged Post navigation ← List all the files in a git repository .git commit messages best practice → Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. ( Log Out / Change ) You are commenting using your Twitter account. ( Log Out / Change ) You are commenting using your Facebook account. ( Log Out / Change ) You are commenting using your Google+ account. ( Log Out / Change ) Cancel Connecting to %s Notify me of new comments via email.