Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Mac. I have installed 'brew' using terminal, now I tried to install 'git' with the command: 'brew install git'. But terminal says "Now install Xcode:"

So I go to this page, but I found that I have to pay (at least) 99$/year to get 'xcode'.

Is there a free version of xcode to download from Apple site? If not, is there a way to install 'git' without 'xcode'?

share|improve this question

migrated from Aug 13 '11 at 9:18

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

Xcode 3.2.6 is free. It works on OS X Snow Leopard(10.6) or later. You have to be a registered Apple Developer to download it. It is also free to register.

Xcode 4.1 is also free. But it works only OS X Lion(10.7). You can download Xcode 4.1 from Mac App Store.

If you are using OS X Lion, you can use Xcode 4.1 or Xcode 3.2.6 for free.

share|improve this answer

To answer the question as posed: get the OSX Installer for Git. I've used it several times. Works just fine, and doesn't require Xcode.

share|improve this answer
This should be the right answer. No need to grab the full xcode package for that – Daniel San Aug 16 '14 at 17:12

Sign up to be an Apple Developer, XCode is free from them through the Apple Developer Connection.

Download Xcode 4 for Free

Xcode 4 is a free download for all members of the iOS and Mac Developer Programs. Log in to your account to begin the download.

share|improve this answer
I believe this is only true for the 3.x version (but not sure if they are still offerring this as a free download). XCode 4.0 can be purchased from the Mac AppStore for about $5 or can be downloaded through the $99 developer program. – gyurisc Aug 12 '11 at 7:01
I just installed XCode 4 two days ago, it cost me nothing. – zellio Aug 12 '11 at 7:05
the only link I see to enroll as developer is this one: and as you can see it has a 99$/year fee. Where is the link to sign up free though? – chefnelone Aug 12 '11 at 7:11
@Mimisbrunnr where did you download it? – chefnelone Aug 12 '11 at 7:14
version 4 comes from the new app store program that comes with OS X 10.7.x versions 3.x.x comes from their site – zellio Aug 12 '11 at 7:26

Brew wants to download source and compile it locally. That requires build tools, and where you get them is with the Apple developer software. So it wants Xcode.

You can download a pre-compiled and ready-to-install version of git here instead.

share|improve this answer

Here's a way to install git on Mac OS X without XCode.

Git's official web site provides an installer :

After installing git, you also have to add its directory to your path : echo "PATH=/usr/local/git/bin:\$PATH" >> ~/.bash_profile source ~/.bash_profile

Adding the directory to the path will prevent Mac OS X from aksing you to install XCode each time you type git in the terminal.

Credits goes to Bobby Allen and to GoZoner's answer on SO.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .