Narven
11/22/2015 - 1:04 AM

bashrc usefull alias

bashrc usefull alias

  alias s="git status -s"

  # one-line log
  l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short

  #status
  s = status -s

  # list branches sorted by last modified
  b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"

  # list aliases
  la = "!git config -l | grep alias | cut -c 7-"

  d = diff
  ds = diff --stat
  dc = diff --cached

  undo-commit = reset --soft HEAD~1