Skip to content

Instantly share code, notes, and snippets.

# initialization file (not found)
@eternalruler
eternalruler / .bashrc
Last active January 21, 2016 22:57
Custom Prompt String One for Git Repo Information
function git_num_untracked_files {
expr `git status --porcelain 2>/dev/null| grep "^??" | wc -l`
}
function git_num_staged_new_files {
expr `git status --porcelain 2>/dev/null| grep "^A" | wc -l`
}
function git_num_staged_modified_files {
expr `git status --porcelain 2>/dev/null| grep "^M" | wc -l`
}
function git_num_unstaged_files {
@eternalruler
eternalruler / .gitconfig
Created January 21, 2016 22:56
Git alias to show all commits/branchs in map graph
[alias]
map = log --all --graph --decorate=short --color --format=format:'%C(bold blue)%h%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%x20%s%x20'