I am new to git and stumbled upon a strange problem
So I did some commits to my local repository and viewed them with git log and it worked fine. After some time I checked out an older commit and later I wanted to jump back to my latest commit to continue my work. So I did another git log. But now the latest 3-4 commits were not displayed. Typing 'git checkout master' brought me to the latest commit of the second log command but not to the commit of the first one I described. Is this a issue or do I have to type another command to get back to the latest commit?
I hope my problem is understandable.
All commands i typed in the right order:
Git add public/
Git commit -m “Fo“
(No errors here)
Git log --oneline.
Output: 8 commits.
Git checkout “id of older commit“
Git log --oneline.
Output: 4 commits
git log --oneline --all --graph --decorate. Also mentioned in an answer wasgit reflog