Which command restores a file from the staging area back to the working directory, discarding staged changes?

Syntax:
git restore --staged (filename)
Example:
git restore --staged index.html

Note: It will successfully execute if the file is in the staged area; otherwise, it will throw an error stating "did not match any files."

Which command shows all references (branches, tags, remotes) along with their commit IDs?

git show-ref

Which command creates a new branch named 'feature-x'?

git checkout -b feature-x
or
git switch -b feature-x

Which command shows the current status of the working directory and staging area?

git status

Which command stages all modified and new files for commit?

git add .