Git aborting – could not detach head / sudden permission problems on OSX Lion


Somehow my git broke over night (computer has not even reset) causing this cryptic error.
After digging, I noticed that my project directory is now owned by root

All I got was “aborting” as a message when I tried to pull in changes from remote. It didn’t even give a hint as to what was wrong.

When I tried to check out, I got a better error message: “could not detach head”.
Google searches lead me to believe it’s a permission issue.

I look around and notice that ls -l shows my git folder owned by root.

sudo chown -R me my_project



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s