瀏覽代碼

add basic git config stuff

Kyle P Davis 11 年之前
父節點
當前提交
14b4f5a237
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      .profile

+ 4 - 0
.profile

@@ -54,6 +54,10 @@ _install_tools() {
 	which tmux >/dev/null  ||  brew install tmux
 	[ -f "$HOME/.bash_profile" ]  ||  ln -sv "$HOME/.profile" "$HOME/.bash_profile"
 	[ -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
 	[ "$(git alias)" ]  ||  (
 		git alias br branch