Files
30-seconds-of-code/snippets/discard-uncommitted.md
Angelos Chalaris 1397bb792e Deprecate expertise
2022-12-04 22:23:55 +02:00

458 B

title, tags, author, cover, firstSeen, lastUpdated
title tags author cover firstSeen lastUpdated
Discard uncommitted changes branch maciv blog_images/arrays.jpg 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