Last active
July 18, 2023 08:23
-
-
Save Elijas/e8680415d620cd16f95c2e6725a6afa5 to your computer and use it in GitHub Desktop.
Convenient 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
# no capitalization | |
git config --global alias.s '!git status' | |
git config --global alias.pp '!git pull --no-edit && git push' | |
git config --global alias.c '!sh -c "git commit -m \"$*\" && git pull --no-edit && git push" -' | |
git config --global alias.ac '!sh -c "git add -A && git commit -m \"$*\" && git pull --no-edit && git push" -' | |
git config --global alias.nac '!sh -c "nbdev_prepare && git add -A && git commit -m \"$*\" && git pull --no-edit && git push" -' | |
# with first letter capitalization | |
git config --global alias.s '!git status' | |
git config --global alias.pp '!git pull --no-edit && git push' | |
git config --global alias.c '!f() { git commit -m "$(echo $* | awk '\''{ $1=toupper(substr($1,1,1)) substr($1,2) }1'\'' )"; git pull --no-edit && git push; }; f' | |
git config --global alias.ac '!f() { git add -A && git commit -m "$(echo $* | awk '\''{ $1=toupper(substr($1,1,1)) substr($1,2) }1'\'' )"; git pull --no-edit && git push; }; f' | |
git config --global alias.nac '!f() { nbdev_prepare && git add -A && git commit -m "$(echo $* | awk '\''{ $1=toupper(substr($1,1,1)) substr($1,2) }1'\'' )"; git pull --no-edit && git push; }; f' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment