Created
July 1, 2010 21:16
-
-
Save nesquena/460579 to your computer and use it in GitHub Desktop.
Git Config .gitconfig file
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
| # brew install git bash-completion | |
| # Completion | |
| if [ -f `brew --prefix`/etc/bash_completion ]; then | |
| . `brew --prefix`/etc/bash_completion | |
| fi | |
| # Editor | |
| export EDITOR='mate -w' | |
| # Git | |
| alias gst='git status' | |
| alias gad='git add .' | |
| alias gci='git commit -av' | |
| alias gcim='git commit -av --amend' | |
| alias gp='git push' | |
| alias gf='git fetch' | |
| # Bash PS1 | |
| LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[1;36m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]"; | |
| GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]"; | |
| # GIT PROMPT (http://gist.github.com/120804) | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/'; | |
| } | |
| function parse_git_status { | |
| git status 2> /dev/null | sed -e '/(working directory clean)$/!d' | wc -l; | |
| } | |
| function check_git_changes { | |
| # tput setaf 1 = RED, tput setaf 2 = GREEN | |
| [ `parse_git_status` -ne 1 ] && tput setaf 1 || tput setaf 2 | |
| } | |
| export PS1="$YELLOW\w\[\$(check_git_changes)\]\$(parse_git_branch)$LIGHT_GRAY $ " | |
| # Brew Path | |
| export PATH="/usr/local/bin:/usr/local/sbin:$PATH" |
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 = <full name> | |
| email = <email> | |
| [color] | |
| diff = auto | |
| status = auto | |
| branch = auto | |
| interactive = auto | |
| ui = auto | |
| [alias] | |
| ci = commit | |
| co = checkout | |
| ps = push | |
| pl = pull | |
| pick = cherry-pick | |
| [apply] | |
| whitespace = nowarn | |
| [core] | |
| editor = mate -wl1 | |
| excludesfile = ~/.gitignore | |
| [github] | |
| user = <gh name> | |
| token = <gh token> | |
| [branch] | |
| autosetupmerge = true | |
| autosetuprebase = always | |
| [push] | |
| default = current | |
| [mergetool "diffmerge"] | |
| cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE | |
| trustExitCode = false | |
| [merge] | |
| tool = diffmerge |
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
| log/* | |
| tmp/**/* | |
| .DS_Store | |
| .svn* | |
| .rvmrc | |
| .bundle/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment