Skip to content

Instantly share code, notes, and snippets.

@dmitriid
Last active Dec 11, 2015
Embed
What would you like to do?
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.utf8
#
# Pretty log with branches and stuff
# http://coderwall.com/p/euwpig?i=3&p=1&t=git
#
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
#
# Display current branch in the shell prompt
#
#alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'"
#function parse_git_branch {
#ref=$(git symbolic-ref HEAD 2> /dev/null) || return
#echo "("${ref#refs/heads/}")"
#}
#PS1="${PS1%\\$ }\[\033[0;31m\]\$(__git_ps1)\[\033[0m\]\$ "
export JIRA2BRANCH_TEAM=api
. ~/.bash_klarna
export GIT_PS1_SHOWDIRTYSTATE=true
. ~/.git-completion.bash
#PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
#PS1="${PS1%\\$ }\[\033[0;31m\]\$(__git_ps1)\[\033[0m\]\$ "
## https://github.com/milkbikis/powerline-shell
function _update_ps1() {
export PS1="$(~/powerline-shell.py --mode=compatible $?)"
}
export PROMPT_COMMAND="_update_ps1"
#
# usage
# >( gbl-4708-co-opensource-katt + (6c161e5))
# $ git mm "testing git alias"
#
# results in "gbl-4708 testing git alias"
#
#bug = !git rev-parse --abbrev-ref HEAD | sed 's/.*\\(\\<[[:alpha:]]\\+\\>\\)\\-\\(\\<[[:digit:]]\\+\\>\\).*/\\1-\\2/g' | cat
#mm = !git m \"`git bug` $1\" ${@:2} && :
stderl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment