Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Nick Burd
Nick Burd
9,419 Points

GIT Install Issues OSX

Currently having an issue installing GIT on my machine. The video suggests that GIT comes with all OSX installs, however mine didn't seem to return a version when I requested it (git --version) That being said, I downloaded the package and installed it, outside of my terminal, even the sudo command wouldn't install it on my machine. sudo apt-get install git does not work, replies to me as command not found (after asking password). my current directory is ~ username$ - any help would be appreciated. Thank you.

3 Answers

Did you install Xcode? I think you need that to enable Command-Line Tools (which can be done in under Preferences, in the Downloads tab). Xcode can be downloaded for free in the Mac App Store. If you're not running Mavericks, even better since there is some... weirdness going on with Command Line Tools in Xcode on Mavericks. ;)

After that, installing Homebrew couldn't hurt.

Nick Burd
Nick Burd
9,419 Points

I've used command line to run SASS and Compass… I assume Xcode is installed..

Look in /Applications and let's make sure. ;)

Nick Burd
Nick Burd
9,419 Points

It's installing, however the GIT video didn't suggest using Xcode for anything.

I know. It's a bit of a nuisance if you're an OS X user. But look on the bright side, if you ever lose your mind and decide to start learning how to develop iOS or Mac apps, you'll be glad you already have it. ;)

Nick Burd
Nick Burd
9,419 Points

Indeed. So once Xcode is installed (and HomeBrew tho not necessary) I shouldn't have an issue installing GIT VCS?

Ideally, you shouldn't have an issue. Run the following command in your OS X Command Line to make sure you have command line tools installed:

$ gcc

Here is more info on Command Line Tools in OS X.

Nick Burd
Nick Burd
9,419 Points

GIT --version now returns back to me with a version number. All seems well.

Thank you for your help Jessica!

No prob. Please remember to vote my answer best answer (if you're so inclined), and good luck in the rest of your coursework. ;)