0

When I run git add .

Then the following message:

error: open("~$myfile.pptx"): Permission denied

error: unable to index file ~$myfile.pptx

fatal: adding files failed

So I run Icacls myfile.pptx /grant user:(F,WD)

But still error.

How to change the rigth permission?

1
  • 1
    ~$myfile.pptx != myfile.pptx. One might be a temporary file with a lock? In other words, don't git add . but try adding only the specific file. Commented Apr 27, 2017 at 14:42

1 Answer 1

1

~$myfile.pptx is a separate file from your powerpoint file myfile.pptx. Those are temporary files created by powerpoint while you have the original open.

It is safe for git to ignore those files. Create a .gitignore file at the base of your project or add this line to it.

~$* 

At which git status shouldn't show that file anymore and git add . won't try to commit it any longer.

Also, here is a widely used .gitignore file for MS office files

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.