Quantcast
Channel: How do I discard unstaged changes in Git? - Stack Overflow
Viewing all articles
Browse latest Browse all 42

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

$
0
0

For all unstaged files in current working directory use:

git checkout -- .

For a specific file use:

git checkout -- path/to/file/to/revert

-- here to remove argument ambiguation.


Viewing all articles
Browse latest Browse all 42

Trending Articles



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