`git stash` says `No local changes to save` even though files changed.
BeginnerTroubleshootingLost Work, HEAD and History Problems
Answer
Likely causes → Changes are only untracked or ignored files (stash skips them by default), or you are in a different directory or repo from where you edited.
Diagnose → git status --short --ignored and git rev-parse --show-toplevel.
Fix → git stash push -u includes untracked files; -a also includes ignored ones. Confirm with git stash list.
Prevent → Use -u when you have new files.
More on Lost Work, HEAD and History Problems
`fatal: Unable to create '/repo/.git/index.lock': File exists.`BeginnerYou added a file to `.gitignore`, but `git status` still shows it as modified.Beginner`fatal: your current branch 'main' does not have any commits yet`Beginner`Author identity unknown *** Please tell me who you are.` and `fatal: unable to auto-detect email address`Beginner`fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.`BeginnerYour commits do not show on your GitHub profile contribution graph.Intermediate