List all the Git commits

List all the commits with Indexes: (Format: <index> <commit-id> <commit-message>)

git log --oneline | nl -v0 | sed 's/^ \+/&HEAD~/'Code language: JavaScript (javascript)

List all the commits without numbers: (Format: <commit-id> <commit-message>)

git log --oneline | sed 's/^ \+/&HEAD~/'Code language: JavaScript (javascript)

Reference:
https://git-scm.com/docs/git-log


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.