Skip to content

Instantly share code, notes, and snippets.

@Theby
Last active September 23, 2025 19:36
Show Gist options
  • Select an option

  • Save Theby/0605306203804782bcb86238fa189c4f to your computer and use it in GitHub Desktop.

Select an option

Save Theby/0605306203804782bcb86238fa189c4f to your computer and use it in GitHub Desktop.
zshrc aliases for git and tig
MAIN_BRANCH="main"
alias restart="exec zsh -l"
alias ts="tig status"
alias gs="git status"
alias gpom="git push origin $MAIN_BRANCH"
alias gcm="git checkout $MAIN_BRANCH"
alias m="git checkout $MAIN_BRANCH"
alias gf="git fetch --all -P"
alias grom="git rebase origin/$MAIN_BRANCH"
alias groq="git rebase origin/qa"
alias gcq="git checkout qa"
alias q="git checkout qa"
alias gsu="git submodule update"
alias gcc="git checkout ."
function gce(){
echo "git checkout esteban/DEV-$1"
eval "git checkout esteban/DEV-$1"
}
function gcbe(){
echo "git checkout -b esteban/DEV-$1"
eval "git checkout -b esteban/DEV-$1"
}
function gpoe(){
echo "git push origin esteban/DEV-$1"
eval "git push origin esteban/DEV-$1"
}
function gcf(){
echo "git checkout feature/$1"
eval "git checkout feature/$1"
}
function gcbf(){
echo "git checkout -b feature/$1"
eval "git checkout -b feature/$1"
}
function gpof(){
echo "git push origin feature/$1"
eval "git push origin feature/$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment