Git · Junior · Question 52 of 75

What is the danger of git reset --hard?

Explanation

--hard overwrites the index and working tree. Committed work can usually be recovered through the reflog, but uncommitted edits are gone.

Further reading

Problem with a question

Git · Junior · question 52

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz