Skip to content

Instantly share code, notes, and snippets.

@flyingoctopus
Last active November 1, 2024 16:46
Show Gist options
  • Select an option

  • Save flyingoctopus/aaff16dc984cd04178ce6cf2a207e5c3 to your computer and use it in GitHub Desktop.

Select an option

Save flyingoctopus/aaff16dc984cd04178ce6cf2a207e5c3 to your computer and use it in GitHub Desktop.
some git niceties for your shell environment
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
# more fun
alias gd='git diff --color | sed "s/^\([^-+ ]*\)[-+ ]/\\1/" | less -r'
alias gc='git commit'
alias gca='git commit -a'
alias gco='git checkout'
alias gcb='git copy-branch-name'
alias gb='git branch'
alias gs='git status -sb' # upgrade your git if -sb breaks for you. it's fun.
alias gac='git add -A && git commit -m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment