Skip to content

Instantly share code, notes, and snippets.

@zaifastafa
Created February 22, 2022 06:36
Show Gist options
  • Save zaifastafa/18be4a91e2d27851f5ab626951a80e27 to your computer and use it in GitHub Desktop.
Save zaifastafa/18be4a91e2d27851f5ab626951a80e27 to your computer and use it in GitHub Desktop.
git commit optimize
gcap() {
git add . && git commit -m "$*" && git push
}
ginit() {
git add . && git commit -m "init commit" && git push -u origin master
}
gchore() {
gcap "chore: $@"
}
gfeat() {
gcap "feat: $@"
}
gfix() {
gcap "fix: $@"
}
grel() {
gcap "release: $@"
}
gdoc() {
gcap "doc: $@"
}
gtest() {
gcap "debug: $@"
}
gwip() {
gcap "wip: $@"
}
gtype() {
echo "
ginit — init
gchore — chore
gfeat — feat
gfix — fix
grel — release
gdoc — doc
gtest — debug
gwip — wip
"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment