Quantcast
Viewing latest article 41
Browse Latest Browse All 42

Answer by G-Man for How do I discard unstaged changes in Git?

git checkout .

This will discard any uncommitted changes to the branch. It won't reset it back if any changes were committed. This is handy when you've done some changes and decide you don't want them for some reason and you have NOT committed those changes. It actually just checks out the branch again and discards any current uncommitted changes.

( must be in the app's root or home dir for this to work )


Viewing latest article 41
Browse Latest Browse All 42

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>