Last active
July 15, 2024 04:56
-
-
Save wittawasw/ca726cf24bf54aeae1537516ace0577a 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
# merge branch into main, develop then tag and push all. | |
ghf () { | |
# hotfix/{VERSION} | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
git checkout develop | |
git merge $BRANCH_NAME | |
git checkout main | |
git merge $BRANCH_NAME | |
VERSION = $(echo $BRANCH_NAME | cut -d'/' -f2) | |
git tag -a {VERSION} | |
git push --all | |
} | |
# remove merged branches | |
gbdm() { | |
g branch | grep -v "main" | xargs git branch -D | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment