GIT Cheatsheet (shortcuts )

AskChandra

AskChandra

· 5 min read
Thumbnail

#!/bin/bash

# Git Shortcuts for Zsh
alias gst='git status'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gl='git pull'
alias gcl='git clone'
alias gb='git branch'
alias gco='git checkout'
alias gm='git merge'
alias glg='git log'
alias gd='git diff'
alias gs='git stash'
alias gr='git remote'
alias gf='git fetch'
alias grs='git reset'
alias gcp='git cherry-pick'
alias grb='git rebase'
alias grh='git reset HEAD'
alias gres='git restore'
alias gt='git tag'
alias gsh='git show'
alias gbl='git blame'
alias gcf='git config'
alias ginit='git init'
alias gclean='git clean'
alias grm='git rm'
alias gmv='git mv'
alias grev='git revert'
alias gbisect='git bisect'
alias ggrep='git grep'
alias gra='git remote add'
alias grr='git remote remove'
alias grn='git remote rename'
alias grsu='git remote set-url'
alias grsh='git remote show'
alias grpr='git remote prune'
alias gru='git remote update'
alias grshh='git remote set-head'
alias grgu='git remote get-url'
alias grsurl='git remote set-url'
alias grsurlp='git remote set-url --push'
alias glr='git pull --rebase'
alias gpsu='git push --set-upstream'
alias gpf='git push --force'
alias gpt='git push --tags'
alias gfp='git fetch --prune'
alias gfa='git fetch --all'
alias gbr='git branch -r'
alias gba='git branch -a'

# You can add more aliases here if needed.
# Ref: https://kapeli.com/cheat_sheets/Oh-My-Zsh_Git.docset/Contents/Resources/Documents/index
AskChandra

About AskChandra

Creating the content ....

Copyright © 2023 AskChandra. All rights reserved.
Made with Love at Sydney
Powered by Vercel
GoPro ↗