Quantcast
Viewing latest article 23
Browse Latest Browse All 42

Answer by Bijan for How do I discard unstaged changes in Git?

git checkout -f


man git-checkout:

-f, --force

When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes.

When checking out paths from the index, do not fail upon unmerged entries; instead, unmerged entries are ignored.


Viewing latest article 23
Browse Latest Browse All 42

Trending Articles



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