Skip to content

Instantly share code, notes, and snippets.

@reduktr
Forked from sdeering/gist:8437725
Created July 14, 2024 00:22
Show Gist options
  • Save reduktr/12f3e7078cecd42544137214ba902875 to your computer and use it in GitHub Desktop.
Save reduktr/12f3e7078cecd42544137214ba902875 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment