Last active
August 29, 2015 14:19
-
-
Save craigbeck/39c4492e9d400b240109 to your computer and use it in GitHub Desktop.
Quick profile setup
This file contains 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
# aliases | |
alias cls='clear' | |
alias ls='ls -FG' | |
alias ll='ls -l' | |
alias la='ll -a' | |
# git completion | |
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then | |
. `brew --prefix`/etc/bash_completion.d/git-completion.bash | |
fi | |
# fancy git-aware prompt | |
export PS1="\$(if [[ \$? == 0 ]]; then echo \"\[\033[01;32m\]\342\234\223\"; else echo \"\[\033[01;31m\]\342\234\227\"; fi) \e[32;1m\]\w \[\e[0m\]\`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\\\\\*\ \(.+\)$/\(\\\\\\\\\1\)\/\`\[\033[00m\]\[\033[37m\]\[\033[00m\]\n$ " |
This file contains 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
# add this to your .gitconfig file in your home directory | |
[alias] | |
co = checkout | |
st = status | |
ci = commit | |
br = branch | |
ai = add --interactive | |
amend = commit --amend | |
hist = log --pretty=format:\"%C(yellow)%h %Cred%ad %Creset| %s%d %Cblue[%an]\" --graph --date=short --decorate | |
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment