Category: Git
You can list commits for a specific branch with the following command:
git log main
Use the oneline
flag to display the commits for a specific branch in a verbose format:
git log main --oneline
The output of the log is a separate line showing the hash and the message for each specific commit.
Alternatively, list all commits for a branch since it was branched:
git log main..feature-branch-name --oneline