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 trialtriplett michael
2,631 PointsGit install quesitons
when i check if git is installed on my mac terminal : git --version i get -bash: git: command not found
any ideas? (running lion)
6 Answers
triplett michael
2,631 Pointsoops sorry i most of made a typo.. i have a mid 2010 mac book pro 2.66 running lion 10.7.5. thanks for the help!
Dave McFarland
Treehouse TeacherSounds like you don't have Git installed. You'll need to install Xcode from the Mac App store, if you don't already have that installed: https://itunes.apple.com/us/app/xcode/id497799835?mt=12
Then you can use the Git OSX installer: http://code.google.com/p/git-osx-installer
Or install Macports (http://www.macports.org) and then run this code in Terminal:
sudo port install git-core +svn +doc +bash_completion +gitweb
triplett michael
2,631 Pointshmm.. doesn't look like i can install Xcode on os 7.5. so i tried installing mac ports with the appropiate installer and then entered dave's command but it gave me this message:
sudo port install git-core +svn +doc +bash_completion +gitweb Password: Error: Error: No Xcode installation was found. Error: Please install Xcode and/or run xcode-select to specify its location. Error: Warning: xcodebuild exists but failed to execute Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: Xcode does not appear to be installed; most ports will likely fail to build. ---> Computing dependencies for git-coreWarning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Error: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it? triplett:~ applicationinstall$
Dave McFarland
Treehouse TeacherYeah, you NEED Xcode to do this. Xcode includes all the "build" tools that lets you compile source code into software on your Mac. You are running system 7.5 on your Mac? You'll need a new mac, if that's the case.
triplett michael
2,631 Pointshmmm well that's a good excuse to upgrade :) or could i just upgrade my os. or would an alternative approach be to install an older version of xcode to get it to work?
Dave McFarland
Treehouse TeacherWhat kind of Mac do you have? Are you sure you have system 7.5 -- that operating system is 18 years old!
triplett michael
2,631 Pointsok thanks so maybe updating my operating system would be the way to go?
Dave McFarland
Treehouse TeacherProbably.
Stone Preston
42,016 Pointstry following the instructions here. Bascially you install some command line tools which include git using Xcode. seems like a simple fix.
James Barnett
39,199 PointsThat's for mountain lion (10.8) not lion (10.7)
Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherYou can get older versions of Xcode at the Apple Developer site: https://developer.apple.com/downloads/index.action You need to create a developer ID to get access to them. In addition, I'm not sure how well those older versions will work with newer source code for Git and Macports.