git log - What happened when/where?

5.2.1. git log - What happened when/where?#

git log   is the command to gain an overview of the history and explore the course of changes.

log: explore the history

  • commits are indicated with * <hash> followed by the commit message

  • Branches, Tags and HEAD are indicated in (...) after the commit hash

Example: git log --all --decorate --oneline --graph:
* dd0df9f (HEAD -> 21-basic-..., origin/21-basic-...) done with ...
* 31bc3cc ...
* b4b660f (origin/main, origin/HEAD, main) ingnore ...
* f5c1e53 ready ...
* 40a7b68 (origin/17-introduce-..., 17-introduce-) Merge ...
|\
| * bcb585a include ...
| * ...
| * 98c37ae changing ...
|/
* 8e4215f (tag: 1.0.0) ignoring ...
* 253dab3 Dev-...
| * 2cc8c54 added ...
| * 0b476b6 typos
|/
* 5d1c76e adding ...
|