I created a new branch.
I thought creating a new branch would switch to it. I now know I should use this code instead git checkout -b <branch_name>
I worked on my file and got it working.
I did a commit and saw this message [detached HEAD decdc89] number of loops works
I still assumed I was on the branch I had created, and it would be a good idea to commit as my code worked.
Then I thought I would merge it
So I git checkout master
Warning: you are leaving 1 commit behind, not connected to any of your branches:
I did git merge making-the-number-of-items-work
But it the work wasn't on that branch, obviously, it wouldn't have made many changes. In fact, possibly it merged old changes, I'm not really sure.
How can I find that original bit of code which appears to have been in detached head mode, or have I lost it? As I made a commit I'm sure there is a way back, but I don't know the commit number.
I tried git log --all but I can't see the commit message anywhere
Sorry for such a badly posed question I really don't know the terms for Git all that well yet.