You are on page 1of 7

GitHUb Commit Details

Sayed Hur Hussain


Count of all commits in a Git

● To show the total count of all commits in a


Git repository
● git rev-list --count HEAD

Show all authors in a Git

● To show all authors in a Git repository on


GitHub
● git log --format="%an <%ae>" | sort -u


Change Git Commit Message

● Change most recent commit message


● git commit --amend -m "New commit message"
● git push -f
Change Commit Message
Using Commit Id
● Change commit message using commit id
● git commit --amend <commit-id>
● git commit --amend <commit-id> -m "New commit message"
● I.e
● git commit --amend
2b63b0f731e4b1281c08682f8a376d24b3ce975d -m "Your
new Message"
● git push -f
Check Reflog Repository

● Displays the reflog for the local repository


● Displays a log of all the reference updates in your Git
repository, including branches, tags, and other references.
It shows a chronological history of reference changes,
even if they are no longer part of the active branch.
● git reflog
● shows the reflog with relative date information (e.g. 2
weeks ago).
● git reflog --relative-date
Show Delete Commit

● how to see deleted commit git


● git reflog show
● Or
● git help reflog

You might also like