I’ll just say what I did:
* Created file1.txt
>git add file1.txt
* Deleted file1.txt
> git status
On branch master No commits yet Changes to be committed: new file: file1.txt Changes not staged for commit: deleted: file1.txt
>git commit -m “not sure what I did here”
[master (root-commit) 594bfbb] not sure what I did here 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 file.txt
So, it looks like git has committed the staged file, which makes sense.
However, I still don’t see the file in my folder (which also makes sense).
Now, I tried to checkout the last commit and, by that, bring the file back:
> git checkout master
Already on 'master' D New Bitmap file1.txt
I still don’t see the file in my folder. I thought by checking out the last commit (which appears to have made a Create and therfore should have my file), that I will be able to retrieve the file from the repo.
Maybe my way of getting the previous commit is wrong? Or I didn’t understand what happened to the file (was it even comitted?)
Any discussion, link or even a tip to give me some direction would be greatly appreciated!