I don't think you can see which branch were checked out and in which order in a sense that you've formulated in the question . Branch is a pointer and this pointer can change only if you do commit.
For example, if you:
- checkout the existing branch branch (
git checkout abc
)
- see its log (
git log -n 10
)
- checkout another existing branch xyz (
git checkout xyz
)
Then git won't remember that you were checking out the abc
branch
Having said that, you can see the commits that you've done during, say last 3 days with this command:
git log --since="3 days ago" --author=<HERE_COMES_YOUR_NAME_IN_GIT> --all
This --since
parameter can be really flexible, 1 day ago
, exact time, 1 week ago
are all possible values, check out the documentation and also this SO thread
Another interesting option is using (in its the most basic form): git for-each-ref --sort=-committerdate refs/heads/
This command will print all commits in all branches in the descending order. There is already thread in SO about this and it provides way more options of possible usage of this command than I can do so please check that out as well.
git reflog|awk '/: checkout:/{print $NF}'
– Menchaca