Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .