mxcl/homebrew — Issue #8515: Initial Homebrew install creates .git directory in /usr/local
Author: deryldoucette
Created: 2011-11-08 23:43:52+00:00
State: open

me@osx-lion:~$ ssh-copy-id
-bash: ssh-copy-id: command not found
me@osx-lion:~$ brew install ssh-copy-id
-bash: brew: command not found
me@osx-lion:~$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/...
/usr/local/Library/Homebrew/...

Press enter to continue
==> Downloading and Installing Homebrew...
==> Installation successful!
Now type: brew help
me@osx-lion:~$ brew help
Example usage:
brew install FORMULA...
brew uninstall FORMULA...
brew search [foo]
brew list [FORMULA...]
brew update
brew upgrade [FORMULA...]
brew [info | home] [FORMULA...]

Troubleshooting:
brew doctor
brew install -vd FORMULA
brew [--env | --config]

Brewing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
open https://github.com/mxcl/homebrew/wiki/Formula-Cookbook

Further help:
man brew
brew home
me@osx-lion:~$ brew update
Initialized empty Git repository in /usr/local/.git/
remote: Counting objects: 47595, done.
remote: Compressing objects: 100% (21334/21334), done.
remote: Total 47595 (delta 29881), reused 41368 (delta 25599)
Receiving objects: 100% (47595/47595), 6.59 MiB | 477 KiB/s, done.
Resolving deltas: 100% (29881/29881), done.
From https://github.com/mxcl/homebrew
* [new branch] gh-pages -> origin/gh-pages
* [new branch] master -> origin/master
HEAD is now at bc78e2b cleanup: add an option to perform a 'dry run'
Already up-to-date.
me@osx-lion:~$

I'm not sure why Homebrew on an initial install would initialise the entire /usr/local/ tree as the root of a repository tree. I'm sure this is not a correct operations thing, I'm sure there's a setting wrong or something similar causing this. I doubt Homebrew actually means to do that to my /usr/local. Not only that, but I'm sure it wouldn't want to attempt to overwrite the *owner's* .git tree if they were using git to manage their local tree, themselves. Did *I* miss something in the initial install? Did *I* somehow cause this? If so, what did I do? Thanks.