Last active
October 23, 2021 11:28
-
-
Save sumanstats/73287a9dff1e3fade006039339c0df51 to your computer and use it in GitHub Desktop.
This file contains 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 the first 6 digits of the hash of last commit | |
# In bash | |
git ls-remote git://github.com/rakudo/rakudo.git refs/heads/master | cut -f 1 | cut -c1-6 | |
# In powershell | |
(git ls-remote git://github.com/rakudo/rakudo.git refs/heads/master).Split()[0].SubString(0,6) | |
# Within repo | |
# bash | |
git log -n 1 --pretty=format:"%H" | cut -c1-6 | |
# powershell | |
(git log -n 1 --pretty=format:"%H").SubString(0,6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment