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

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

$
0
0
git clean -df

Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.

-d: Remove untracked directories in addition to untracked files

-f: Force (might be not necessary depending on clean.requireForce setting)

Run git help clean to see the manual


Viewing all articles
Browse latest Browse all 42

Trending Articles



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