Skip to content

Instantly share code, notes, and snippets.

@sdeering
Created January 15, 2014 14:55
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save sdeering/8437725 to your computer and use it in GitHub Desktop.
Save sdeering/8437725 to your computer and use it in GitHub Desktop.
Some .bashrc git alias commands
#-------------------------------------------------------------
# Git Alias Commands
#-------------------------------------------------------------
alias g="git status"
alias ga="git add"
alias gaa="git add ."
alias gau="git add -u"
alias gc="git commit -m"
alias gca="git commit -am"
alias gb="git branch"
alias gbd="git branch -d"
alias gco="git checkout"
alias gcob="git checkout -b"
alias gt="git stash"
alias gta="git stash apply"
alias gm="git merge"
alias gr="git rebase"
alias gl="git log --oneline --decorate --graph"
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
alias glga="git log --graph --oneline --all --decorate"
alias gb="git branch"
alias gs="git show"
alias gd="diff --color --color-words --abbrev"
alias gdc="git diff --cached"
alias gbl="git blame"
alias gps="git push"
alias gpl="git pull"
alias gb="git branch"
alias gc="git commit"
alias gd="git diff"
alias go="git checkout "
alias gk="gitk --all&"
alias gx="gitx --all"
# show ignored files by git
alias gx="ign = ls-files -o -i --exclude-standard"
# Untrack Files without deleting them
alias grmc="git rm -r --cached"
@TheDirams
Copy link

Thanks man it really helped me a lot!

@L1so
Copy link

L1so commented Dec 26, 2021

Thank you, I'm learning how to use git command step by step

@PhilipSchmid
Copy link

Thanks for sharing!

BTW: gd is used twice and one might also want to add alias gf="git fetch"

@guclaw
Copy link

guclaw commented Mar 5, 2023

Thanks for aliases!
gc is used twice as git commit -m and git commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment