Created
November 27, 2016 15:25
-
-
Save joshuabaker/a82c45b03d53771bd46b16af3f45ade0 to your computer and use it in GitHub Desktop.
Helpful git commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get latest tag | |
git describe --abbrev=0 --tags | |
# Get latest commit | |
git rev-parse HEAD | |
# Get latest commit author | |
git --no-pager show -s --format="%aN <%aE>" HEAD | |
# Get latest commit message (trimmed) | |
git log --format=%B -n 1 HEAD | xargs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment