Replaces every tracked file in the working tree with its staged version, throwing away all local edits. There is no undo for this, so check git status and git diff first. Untracked files survive; remove those with git clean.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.