Last active
September 14, 2023 12:11
-
-
Save TheBigRoomXXL/6b23edb7d0e815fd466f1eb600d496b3 to your computer and use it in GitHub Desktop.
Git shortcut
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
#!/bin/bash | |
` | |
add () { | |
git add . | |
} | |
commit () { | |
git commit -m "$1" | |
} | |
feat () { | |
git commit -m "feat: $1" | |
} | |
fix () { | |
git commit -m "fix: $1" | |
} | |
refacto () { | |
git commit -m "refacto: $1" | |
} | |
misc () { | |
git commit -m "misc: $1" | |
} | |
ci () { | |
git commit -m "ci: $1" | |
} | |
doc () { | |
git commit -m "doc: $1" | |
} | |
amend () { | |
if [[ $# -eq 1 ]] | |
then | |
git commit --amend --no-edit -m "$1" | |
else | |
git commit --amend --no-edit | |
fi | |
} | |
test-ci () { | |
git add . | |
git commit --amend --no-edit | |
git push -f | |
} | |
push () { | |
git push | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment