Homebrew/homebrew — pull request #31107 by jdhealy (2014-07-25 03:14:41+00:00)
Title: If `git remote add` fails, fallback to `git remote set-url`.

Avoids git error `fatal: remote origin already exists.`

```shell
$ ruby ./install
==> This script will install:
/tmp/homebrew-test/bin/brew
/tmp/homebrew-test/Library/...
/tmp/homebrew-test/share/man/man1/brew.1

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir /tmp/homebrew-test
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /tmp/homebrew-test
==> /usr/bin/sudo /usr/bin/chgrp admin /tmp/homebrew-test
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
fatal: remote origin already exists.
```