error: git checkout-index: unable to create file (Permission denied)

When I try and pull from github I get a strange error. Can I bypass this or force it? I have used sudo before which I suspect would work however this caused other problems.


I had this problem as well. I solved it by changing the ownership of the directories to the user I was trying to git pull with:

sudo chown -R anthony:anthony *

I ran that at the root of my git tracked directory to make sure all the files were owned by the correct user.

In my case it was having sublime text open with the git controlled directory added as a folder in the sublime project. After closing sublime I was able to switch branches without a problem.

Need Your Help

makefile calling function inside a function


This might be a very basic but I need to call a function within a function but I cannot figure it out:

Can't seem to get Bundler to run properly on Rails App server using Capistrano to deploy

ruby-on-rails ruby passenger bundler capistrano3

I've been using Rails for a couple of months now and made a small app that I'm trying to deploy with Capistrano. The problem is that when I run