What is the best way to discard uncommitted changes with Git.
I read this, but want to fully understand what each step is doing.
git undo all uncommitted or unsaved changes
git reset
"This will unstage all files you might have staged with git add", what does unstage mean?
Does this mean remove any added files?
git checkout .
"revert all local uncommitted changes (should be executed in repo root)"
What is considered the root? If I am on Branch A and I want to disregard all uncommitted changes on Branch A, is Branch A considered the root?
git clean -fdx
"WARNING: -x will also remove all ignored files, including ones specified by .gitignore! You may want to use -n for preview of files to be deleted."
Is this deleting my files? including ignored files? What if ignored files were not changed?