Skip to content

Instantly share code, notes, and snippets.

@HaskellZhangSong
Last active December 20, 2022 02:03
Show Gist options
  • Save HaskellZhangSong/e44bbb0846aa2fb3e701affb52e9c4e5 to your computer and use it in GitHub Desktop.
Save HaskellZhangSong/e44bbb0846aa2fb3e701affb52e9c4e5 to your computer and use it in GitHub Desktop.
git related bash alias
alias gp="git pull"
alias gpr="git pull --rebase"
alias gc="git checkout ."
alias grs="git reset ."
alias gps="git push"
alias gpf="git push -f"
alias gcan="git commit --amend"
alias gcane="git commit --amend --no-edit"
alias gs="git status"
alias gd="git diff"
alias gdn="git diff --name-only"
alias gr="git remote"
alias grv="git remote -v"
alias gcf="git clean -fd"
alias gl1="git log -1"
alias gl2="git log -2"
alias gl3="git log -3"
alias gl4="git log -4"
alias gb="git branch"
alias gba="git branch -a"
alias gf="git fetch"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment