git 479 B

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