Skip to content

Instantly share code, notes, and snippets.

@krushik
Created March 29, 2017 19:17
Show Gist options
  • Save krushik/128bfed6bc407ed58df201aed27207df to your computer and use it in GitHub Desktop.
Save krushik/128bfed6bc407ed58df201aed27207df to your computer and use it in GitHub Desktop.
.gitconfig + git friendly bash prompt
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_THEME=Single_line_Solarized
source ~/.bash-git-prompt/gitprompt.sh
[core]
autocrlf = input
[push]
default = simple
[apply]
whitespace = nowarn
[branch]
autosetuprebase = always
autosetupmerge = always
[color]
branch = auto
diff = auto
status = auto
ui = true
#[color "branch"]
# current = yellow reverse
# local = yellow
# remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = green
changed = yellow
untracked = cyan
[alias]
st = status
ci = commit
ca = commit -a -m
co = checkout
br = branch -a
branches = branch -a
pick = cherry-pick
amend = commit --amend
merged = branch -a --merged
graph = log --graph --full-history --all --color --pretty=tformat:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m"
# `latest` is ~/bin/git-latest
# `mine` is ~/bin/git-mine
# `deletemerged` is ~/bin/git-deletedmerged
# `squash` is ~/bin/git-squash
@krushik
Copy link
Author

krushik commented Mar 29, 2017

cd ~
git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt --depth=1

use git_prompt_list_themes in bash session to list available themes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment