I am wondering if there is a way to get the SHA1 of the last commit via a Git alias.
I have the following so far, but it is throwing an error:
Error extending the alias "last-commit"; '9fa5c2c72e586ce825d54114532400d8cc56106f' is not a Git team
The command I use to create an alias last-commit:
git config --global alias.last-commit `log -1 --pretty=format:%H`
I know that it git log -1will provide me with the latest commit information, but I want the latest SHA1 commit on its own, so I can use it with cat.
Any help is appreciated
source
share