Git checkout to first commit
git
Solution
You can use `git reflog` to see where you were before. You'll see an entry like
checkout: moving from master to 47a33c8
Just do `git checkout master` to return to that branch.
To list all the branches, use `git branch -l`.
Problem
How do I list all of my git branches after checking out my first commit? For example ``` git log --oneline ``` displays all of my branches: ``` 06c4b5c Version 3 of Hello World efa167f Version 2 of Hello World 47a33c8 Hello World ``` If I check out my first commit ``` git checkout 47a33c8 ``` this message is displayed You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout... then if I do this: ``` git log --oneline ``` only the first commit is displayed now: 47a33c8 Hello World My question is, if I did not know the location of HEAD was at 06c4b5c originally, how do I return to this location after checking out the first commit? Also, I get this error Error: pathspce '06c4b5c' did not match any file(s) known to git. when i try to checkout 06c4b5c ``` git checkout 06c4b5c ```