Skip to content

Instantly share code, notes, and snippets.

@jl
Last active January 3, 2016 04:49
Show Gist options
  • Save jl/8411735 to your computer and use it in GitHub Desktop.
Save jl/8411735 to your computer and use it in GitHub Desktop.
Collection of useful git aliases.
# Add the following to ~/.gitconfig
# [include]
# path=joey.gitconfig
[alias]
st = status
br = branch
# Show graphical history in terminal.
gr = log --graph --oneline --abbrev-commit --decorate --color
gra = log --graph --oneline --abbrev-commit --decorate --color --all
# List refs sorted by date.
brdate = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:relative) %(refname:short)'
brdatea = for-each-ref --sort=committerdate refs/ --format='%(committerdate:relative) %(refname:short)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment