When I check out a previous commit of a git repository, 'git log' no longer shows commits that were committed after the currently checked out commit.
So, the question is: how do get a log of commits after the currently checked out one?
When I check out a previous commit of a git repository, 'git log' no longer shows commits that were committed after the currently checked out commit.
So, the question is: how do get a log of commits after the currently checked out one?
You can use the --all
flag to see all revisions, as in
git log --all
If you are just interested in the future revisions, you can also use
git log ..@{1} # assuming you just switched from the future master
git log ..abcdef # assuming abcdef is the newest future commit
The problem is: you don't know the children commits, only the parent comments.
And if you checkout directly a commit SHA1, you are in Detached HEAD mode (ie not on any branch).
One potential solution would be to list all the branches which contains your commit: "How to know which branch a “git log” commit belongs to?".
And then do a git log for each of those branches.