Github Alias and Autosquash
[alias ]
lg = ! " git lg1"
lg1 = ! " git lg1-specific --all"
lg2 = ! " git lg2-specific --all"
lg3 = ! " git lg3-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
co = checkout
ac = " ! f() { git add . && git commit -m \" $@ \" ; }; f"
pr = "pull --rebase origin master"
sh = stash
pu = ! git push -u origin $( git symbolic-ref HEAD)
diffc = ! git log -1 -p $1
wip = ! " git add . ; git commit -m \" WIP\" "
unwip = ! " git reset HEAD~"
[rebase ]
autosquash = true
if $( git rev-parse --is-inside-work-tree > /dev/null 2>&1 ) ; then
dirty=$( parse_git_dirty)
ref=$( git symbolic-ref HEAD 2> /dev/null) || ref=" ➦ $( git rev-parse --short HEAD 2> /dev/null) "
if [[ -n $dirty ]]; then
prompt_segment yellow black
else
prompt_segment green black
fi
if [[ -e " ${repo_path} /BISECT_LOG" ]]; then
mode=" <B>"
elif [[ -e " ${repo_path} /MERGE_HEAD" ]]; then
mode=" >M<"
elif [[ -e " ${repo_path} /rebase" || -e " ${repo_path} /rebase-apply" || -e " ${repo_path} /rebase-merge" || -e " ${repo_path} /../.dotest" ]]; then
mode=" >R>"
elif [[ $( git log --format=%s -n 1 HEAD) == " WIP" ]]; then
mode=" >WIP<"
fi