Last active
November 19, 2024 09:18
-
-
Save anshulsahni/b36973cbe56e1891fa273ff082737f3b to your computer and use it in GitHub Desktop.
List of different kinds of aliases I use
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
### deployment tool aliases | |
## docker | |
# docker image | |
alias dckils='docker image ls' | |
alias dckilsa='docker image ls -a' | |
# docker container | |
alias dckcls='docker container ls' | |
alias dckclsa='docker container ls -a' | |
# docker container | |
dckbld () { docker build --tag="$1":latest .; } |
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
## git | |
# git push | |
alias gpo='git push origin' | |
alias gpof='git push origin'$1' --force-with-lease' | |
# git pull | |
alias guo='git pull origin' | |
alias guor='git pull -r origin' | |
# git reset | |
alias grh='git reset HEAD' | |
alias grh1='git reset HEAD~1' | |
# git add | |
alias gap='git add -p' | |
alias gafp='git add '$1' -p' | |
alias gaa='git add --all' | |
alias gad='git add' | |
# git commit | |
alias gco='git commit' | |
alias gcon='git commit --amend --no-edit' | |
alias gcoa='git commit --amend' | |
alias gcov='git commit -n' | |
# git log | |
alias glo='git log' | |
alias gloo='git log --oneline' | |
# git checkout | |
alias gho='git checkout' | |
alias ghob='git checkout -b' | |
# others | |
alias gis='git status' | |
alias after_guo='git diff --color-words master@{1}..master' | |
## github cli | |
alias clone='gh repo clone' | |
alias create_pr='gh pr create' | |
alias create_isu='gh issue create' | |
alias create_gis='gh gist create' | |
alias create_repo='gh repo create' | |
alias my_open_prs='gh pr list --author=@me' | |
alias hrl='gh run list' | |
alias hrf='gh run list -w' |
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
### Aliases which doesn't fit anywhere else | |
# ls | |
alias lsag='ls -la | grep' | |
alias lsa='ls -la' | |
# qpdf | |
pdf_combine () { qpdf --empty --pages "$1" 1-z "$2" 1-z -- "$3"; } | |
pdf_decrypt () { qpdf --decrypt -password=$@; } | |
#dpkg | |
alias deb_add='sudo dpkg -i' | |
#apt | |
alias apt_add='sudo apt install' |
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
#Helmfile | |
alias hsync='helmfile -f ~/Works/razorpay/kube-manifests/helmfile/helmfile.yaml sync' | |
alias hdel='helmfile -f ~/Works/razorpay/kube-manifests/helmfile/helmfile.yaml delete' | |
alias hopen='code ~/Works/razorpay/kube-manifests/helmfile/helmfile.yaml' |
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
### package managers | |
## NPM | |
# npm install | |
alias npi | |
alias npes='npm install --save--exact' | |
alias npis='npm install --save' | |
alias nped='npm install --save--exact --save-dev' | |
alias npid='npm install --save-dev' | |
alias npig='npm install --global' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment