- To see the git commit history, we can use git log command
- it will shows all the information related to git commits
- Commit history always shows in time lienier manner with branch specific
- HEAD is always points to latest commit in that branch
Commit history with information | git log |
Commit history with information in one line | git log –oneline |
- Git log shows us
- Commit hash and shows head pointing which branch on latest commit
- Author
- Date
- message
- Here above six.txt is single line commit, Here line1 line2 is multiline/large information commit
Here some more commands for filtering the log responce:
To see last 5 commits | git log -5 |
To see commits from the date | git log –since=2023-01-01 |
To see commits up to the date | git log –since=2023-04-01 |
To see commits specific user | git log –author=”user_name” |
To see commits specific user in one line | git log –oneline –author=”user_name” |