Last active
January 3, 2022 18:19
-
-
Save jtyr/0762acb5debf0c8f33b38c3b67a64515 to your computer and use it in GitHub Desktop.
Useful Git aliases
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
git config --global alias.workprofile 'config user.email [email protected]' | |
git config --global alias.tagv "\!git --no-pager tag --sort=v:refname --sort=creatordate --format='%(objectname) %(refname:strip=2)'" | |
git config --global alias.lv 'rev-parse HEAD' | |
git config --global alias.ltag "\!git tag --sort=v:refname --sort=creatordate | tail -n1" | |
git config --global alias.ltagv '!git tagv | tail -n1' | |
git config --global alias.itag "\!(git ltag || echo 0.0.0) | awk '{split(substr(\$0, 2), a, \".\"); printf \"v%d.%d.%d\", a[1]+1, 0, 0}'" | |
git config --global alias.iitag "\!(git ltag || echo 0.0.0) | awk '{split(substr(\$0, 2), a, \".\"); printf \"v%d.%d.%d\", a[1], a[2]+1, 0}'" | |
git config --global alias.iiitag "\!(git ltag || echo 0.0.0) | awk '{split(substr(\$0, 2), a, \".\"); printf \"v%d.%d.%d\", a[1], a[2], a[3]+1}'" | |
git config --global alias.aitag '!git tag $(git itag)' | |
git config --global alias.aiitag '!git tag $(git iitag)' | |
git config --global alias.aiiitag '!git tag $(git iiitag)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment