git 304 B

123456789101112
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. has git || gimme_pkg git
  4. if ! [[ -f "$HOME/.gitconfig" ]]; then
  5. git config --global color.ui true
  6. if [[ "$OS" = "Darwin" ]]; then
  7. git config --global credential.helper "osxkeychain"
  8. else
  9. git config --global credential.helper "cache --timeout=3600"
  10. fi
  11. fi