The question is simple: I want to see the output of git log
, but for the entire repository. Currently it just shows the changesets in the branch I am on: git log --all --source --graph
.
For example, it would be perfect if I could see the last 100 commits in the repository no matter what branch I am on and what branches those commits belong to. Is this possible?
Give this command a try:
git log --all --graph --decorate --pretty=oneline --abbrev-commit
You already had the right start with --all --graph
. Adding in --decorate
will show any branches or tags pointing to a commit, and the others two, --pretty=oneline --abbrev-commit
are just to clean up and compact the output.
It's best to include the --pretty
in the command, because --decorate
won't work if you're using a custom format.
If this is a command you're going to use a lot, you can actually add an alias so it's easy to reuse without typing the whole thing out. For instance, add the following to your ~/.gitconfig
:
[alias]
history = "git log --all --graph --decorate --pretty=oneline --abbrev-commit"
Then you can just use git history
to get the nicely formatted output.
You can also use gitk --all
to show all the commits, that what's you need as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With