how to get last commit in git code example
Example 1: how to see all commits in git
$ git log --pretty=format:"%h - %an, %ar : %s"
ca82a6d - Scott Chacon, 6 years ago : Change version number
085bb3b - Scott Chacon, 6 years ago : Remove unnecessary test
a11bef0 - Scott Chacon, 6 years ago : Initial commit
Example 2: how do i get the last commit
$ git reset --soft HEAD~1
Example 3: command to check recent commit
git log --name-status HEAD^..HEAD
Example 4: get back some commits git
git revert {commit_id}'