Files
30-seconds-of-code/snippets/discard-uncommitted.md
Isabelle Viktoria Maciohsek ed2f41b0d8 Bake dates into snippets
2021-06-13 19:47:48 +03:00

427 B

title, tags, firstSeen, lastUpdated
title tags firstSeen lastUpdated
Discard uncommitted changes branch,intermediate 2021-04-06T11:11:08+03:00 2021-04-13T21:10:59+03:00

Discards all uncommitted changes to the current branch.

  • Use git reset --hard HEAD to reset the local directory to match the latest commit and discard all unstaged changes.
git reset --hard HEAD
git reset --hard HEAD
# Discards all unstaged changes