File: git-alias

package info (click to toggle)
git-extras 1.7.0-1.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 696 kB
  • sloc: sh: 381; makefile: 52
file content (7 lines) | stat: -rwxr-xr-x 186 bytes parent folder | download
1
2
3
4
5
6
7
#!/bin/bash

case $# in
  0) git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort ;;
  1) git alias | grep -e "$1" ;;
  *) git config --global "alias.$1" "$2" ;;
esac