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 trialAbbey Jackson
1,660 Pointsgit status giving error on Mac
I have installed Xcode and when I opened the terminal on my Mac it asked me to run sudo first to agree to the terms. I did that. However, next I got: "fatal: Not a git repository (or any of the parent directories): .git" What can I do to fix this?
3 Answers
Abbey Jackson
1,660 Pointsoh my goodness, sorry. I googled and found the answer. I'm brand new to Mac and finding myself a little overwhelmed (had to get one for school)...I had to call support just to find out how to "select all" in a folder (apparently you can't, you have to click and drag), which was a little humbling for me.
For anyone else having the same error: After you do git status and agree to the terms, the error is because there is no git repository in your current directory. To get it working all you have to do is "get init" and the files will be set up. You may want to change directories before you do this if you want the git repository in a specific location.
Nate Meyer
3,887 Pointsoh my goodness, sorry. I googled and found the answer
I do this about 75 times a day.
Kei Emb
3,929 PointsHey Abby!
I have been having this same issue with my Mac. Im installing Xcode now and tried to use the "get init" but I get -bash: get: command not found.
(Update) I have git installed now however I can't get the sudo apt-get command to work on my Macbook v. 10.8.5 Mountain Lion
Any pointers??
Thanks in advance!
Kevin Korte
28,149 PointsGlad to hear you got it figured out. In regards to select all in a folder, try Command
than a
as a keyboard shortcut.
Abbey Jackson
1,660 PointsOMG why didn't the tech at Apple know this???!?
..I mean, thank you :D
Kevin Korte
28,149 PointsI don't know. Makes you wonder right? You're welcome!
Abbey Jackson
1,660 PointsKei, xcode is the app you use to write programs but git is separate, you have to install it also. After it's installed then you git init in the directory where you will be working with it.
Kei Emb
3,929 PointsOhhh, now I "git" it. :) Thanks for the help!
benjamind
6,442 Pointsbenjamind
6,442 PointsIn Mac OS Sierra (and probably earlier versions) you need to install the Command Line Utilities for developers. The easiest way to get them (including git) is to type
xcode-select --install
in terminal and follow the installation process.