Last active
May 31, 2024 01:22
-
-
Save Hiweus/7efb35e3b8bb180f32da31f86599a145 to your computer and use it in GitHub Desktop.
Useful aliases for devs
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
## Utils | |
unalias reload cedit 2> /dev/null | |
alias reload="source ~/.zshrc" | |
alias cedit="code ~/.zshrc" | |
## Git | |
unalias c gs gl gpl gp 2> /dev/null | |
function c() { | |
git commit -m "$*" | |
} | |
alias gs="git status" | |
alias gl="git log" | |
alias gpl="git pull" | |
alias gp='git push -u origin $(git branch --show-current)' | |
unalias c- m- m 2> /dev/null | |
alias c-="git checkout -" | |
alias m-="git merge -" | |
function m() { | |
local main=$(git branch | grep -E "^\s*(main|master)$" | xargs) | |
git checkout $main | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment