79247201

Date: 2024-12-03 10:32:53
Score: 1
Natty:
Report link

The Simple form of answer is,

To dicard all uncommited changes alone, [this will remove staged files as well] and you dont want them to be in the local. -> git reset --hard

To discard all unstaged changes or files, [this wont remove the files from the local, but will enable you to checkout to another branch] -> git stash

[try dry-run before doing this] To discard all untracked files: -> git clean

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: vishwa