Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've put my working dir on an ntfs drive so as to be able to work from both windows and ubuntu linux. I've put this one under git. When I try to run "git stash" from ubuntu, I've got the following error:

cp: preserving times for `$MYGITWORKDIR/.git/.git-stash.6306-index': Operation not permitted Cannot save the current worktree state

When I tried the same thing from windows using msysgit, no such problem occurred.

My guess is it's "cp" on ntfs folder. Is there any way to patch this problem or is it a known issue?

share|improve this question
    
git stash is just using cp -p. I guess the ntfs driver that you are using does not support utimes(2). This causes cp -p to issue an error, which causes git stash to abort. –  Chris Johnsen Oct 10 '10 at 12:46
    
Yeah i think so too. On googling, some people do suggest to patch "cp" itself. But I felt it a little extreme. –  antreality Oct 12 '10 at 15:16

1 Answer 1

Add the following option to ntfs-device under /etc/fstab:

uid=USERID

USERID is 1000 for me, but you can get yours with the shell command id.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.