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

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

$
0
0

This checks out the current index for the current directory, throwing away all changes in files from the current directory downwards.

git checkout .

or this which checks out all files from the index, overwriting working tree files.

git checkout-index -a -f

Viewing all articles
Browse latest Browse all 42

Trending Articles