I'm a bit confused, and need to recover from a delete (?) properly

What I’m trying to do

Follow and understand the best practice way of recovering an accidentally deleted file in concert with the obsidian-git plugin

I have a Kinesis keyboard, I love, but I must have hit the delete key by mistake. A note disappeared from the file explorer. I hit ctrl-z quickly, but it is still missing from the view. I stopped and restarted obsidian, but it’s the same. In the obsidian git sidebar, it shows the ‘D’ and then an ‘U’. Which from the cli git status is deleted and untracked. I found the file still exist in the directory, so maybe I hit some other key. I don’t know.

I’m not a git expert, but normally, outside of obsidian when a file is deleted it’s gone, and I found this solution that would check out just the deleted file but since the file still exist, all I need to do it revert the git delete right? But would that allow the obsidian explorer to show it again?

I would like to correct the mistake correctly. I know I could “hack it” by copying the file somewhere else and add it back, but I want to understand what’s going on between obsidian and obsidian git and the proper way. Lastly, what I fat-fingered, if not the delete key.

Things I have tried

From the link above: git - How to undo local changes to a specific file - Stack Overflow

I must be past the time to edit. I’m a private person, so I didn’t include this, but it’s not really that private, and it probably tells me what to do.

Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
deleted: Cloud Academy/Docker Certified Associate Outline/1. Introduction/3. Docker Architecture.md
modified: cheat-sheets/tools/git.md

Untracked files:
(use “git add …” to include in what will be committed)
Cloud Academy/Docker Certified Associate Outline/3. Docker Architecture.md

I think, restore and then add if needed. I would do a restore, then another status to check. I’m still very confused on what actually happened, though.

fyi, just taking this course and working on the outline, for study. (as it’s out there now :slight_smile: )