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.
From the link above: git - How to undo local changes to a specific file - Stack Overflow