"buying" the free copy of XCode and installing it is required for the command line tools that homebrew relies on.
No, you can simply download the command line tools that Apple provides free of charge - which the homebrew install script in fact does.
This is also a bit weird since getting git installed on OSX in the first place requires it's own hoop: "buying" the free copy of XCode and installing it is required for the command line tools that homebrew relies on.