-
-
Save trumbitta/1405549 to your computer and use it in GitHub Desktop.
My version with tweaks and inspiration from holman/dotfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
alias git=hub | |
alias gis="git status" | |
alias gits="git status" | |
alias gitp="git pull" | |
alias safepull="git stash && git pull && git stash apply" | |
alias dspurge="sudo find . -name \".DS_Store\" -depth -exec rm {} \;" | |
alias gituserme='git config user.name "William Ghelfi" && git config user.email [email protected] && cat .git/config | grep -C2 "[user]"' | |
alias gituserwilliam='git config user.name "William Ghelfi" && git config user.email [email protected] && cat .git/config | grep -C2 "[user]"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f /usr/local/Cellar/git/1.9.1/etc/bash_completion.d/git-prompt.sh ]; then | |
source /usr/local/Cellar/git/1.9.1/etc/bash_completion.d/git-prompt.sh | |
fi | |
if [ -f /usr/local/Cellar/git/1.9.1/etc/bash_completion.d/git-completion.bash ]; then | |
source /usr/local/Cellar/git/1.9.1/etc/bash_completion.d/git-completion.bash | |
fi | |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_unpushed { | |
local unpushed=`/usr/bin/git cherry -v origin/$(get_git_branch)` | |
[[ "$unpushed" != "" ]] && echo "$(tput setaf 1) ++> $(tput sgr0)" | |
} | |
function parse_git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[[ $? == 1 ]] && echo " $(tput bold)$(tput setaf 3)*$(tput sgr0)" | |
} | |
function get_git_branch { | |
echo $(__git_ps1 "%s") | |
} | |
function parse_git_branch { | |
local branch=$(get_git_branch) | |
[[ $branch ]] && echo "[$(tput setaf 6)$branch$(tput sgr0)$(parse_git_dirty)]$(parse_git_unpushed)" | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h \w$(parse_git_branch)\n$ ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_unpushed { | |
local unpushed=`/usr/bin/git cherry -v origin/$(get_git_branch)` | |
[[ "$unpushed" != "" ]] && echo "$(tput setaf 1) ++> $(tput sgr0)" | |
} | |
function parse_git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[[ $? == 1 ]] && echo " $(tput bold)$(tput setaf 3)*$(tput sgr0)" | |
} | |
function get_git_branch { | |
echo $(__git_ps1 "%s") | |
} | |
function parse_git_branch { | |
local branch=$(get_git_branch) | |
[[ $branch ]] && echo "[$(tput setaf 6)$branch$(tput sgr0)$(parse_git_dirty)]$(parse_git_unpushed)" | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h \w$(parse_git_branch)\n$ ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = William Ghelfi | |
email = [email protected] | |
[github] | |
user = username | |
token = xyzverylong | |
[alias] | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
[color] | |
ui = auto | |
[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 = yellow | |
changed = green | |
untracked = cyan | |
[core] | |
excludesfile = /home/user/.gitignore_global |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment