Two mistakes, both caught before any commit:
deployment.yamlhas a broken edit you want to throw away.passwords.txtgot staged by accident. It must never be committed.
text
git restore deployment.yaml ← working folder: back to the staged version, or the last commit
git restore --staged passwords.txt ← staging area: unstage, keep the filegit restore <file> replaces your edit with the committed version. Git never saw that edit, so it can't bring it back. Make sure you don't want it first.
Objectives
- Throw away the edit to
deployment.yaml. - Unstage
passwords.txt, but keep the file.