Browse Source

add basic git config stuff

Kyle P Davis 10 years ago
parent
commit
14b4f5a237
1 changed files with 4 additions and 0 deletions
  1. 4 0
      .profile

+ 4 - 0
.profile

@@ -54,6 +54,10 @@ _install_tools() {
 	which tmux >/dev/null  ||  brew install tmux
 	which tmux >/dev/null  ||  brew install tmux
 	[ -f "$HOME/.bash_profile" ]  ||  ln -sv "$HOME/.profile" "$HOME/.bash_profile"
 	[ -f "$HOME/.bash_profile" ]  ||  ln -sv "$HOME/.profile" "$HOME/.bash_profile"
 	[ -f "$HOME/.bashrc" ]        ||  ln -sv "$HOME/.profile" "$HOME/.bashrc"
 	[ -f "$HOME/.bashrc" ]        ||  ln -sv "$HOME/.profile" "$HOME/.bashrc"
+	[ -f "$HOME/.gitconfig" ]  ||  (
+		git config --global color.ui true
+		git config --global credential.helper "$([ "$(uname -s)" = "Darwin" ] && echo "osxkeychain" || echo "cache --timeout=3600")"
+	)
 	which git-alias >/dev/null  ||  brew install git-extras
 	which git-alias >/dev/null  ||  brew install git-extras
 	[ "$(git alias)" ]  ||  (
 	[ "$(git alias)" ]  ||  (
 		git alias br branch
 		git alias br branch