2

I use $ git add .
but it is print:

error: open("AppData/Local/Comms/UnistoreDB/USS.jtx"): Permission
denied error: unable to index file
AppData/Local/Comms/UnistoreDB/USS.jtx fatal: adding files failed

If I use run to open it in Windows 10 pro 1703, it asks to open with another program (last time it says open by virtual machine 8210b_xxxx I forgot what's the numbers on x)
what's wrong ?

system ver.:windows pro 1703 
antivirus:windows defender 
git ver.:Git-2.15.1.2-64-bit
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
黃天貓
  • 29
  • 1
  • 6

1 Answers1

0

It sounds like you have a git repository defined in C:\users\yourLogin, which seems odd and not recommended. Try and confirm that with git rev-parse --show-toplevel

Anyway, one reason that file might not be added is because another process is keeping an handle on it. You can check that with Process Explorer (type Ctrl+F, and look for USS.jtx)

But more importantly, check where you Git repo should be, because it should not be in C:\users\yourLogin.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • but my repo is in the C:/Users/user /.git how should I do? – 黃天貓 Jan 10 '18 at 05:36
  • @黃天貓 If you did not intent to have a Git repo there (and don't care about your history), you should delete, or at least rename the .git/ folder, and `git init .` in the right folder (meaning creating the Git repo where you actually want it to be) – VonC Jan 10 '18 at 05:38
  • and I can't find witch ************* process open USS.jtx – 黃天貓 Jan 10 '18 at 05:39
  • @黃天貓 That is OK, because once your Git repo will be where you need it to be, it won't matter anymore. – VonC Jan 10 '18 at 05:39
  • can I delete .git? – 黃天貓 Jan 10 '18 at 05:40
  • @黃天貓 Again, if you do not care about any commit done in it, yes. Or, just to be safe, you can rename it for safekeeping. – VonC Jan 10 '18 at 05:41
  • fuuuuuuuu...... I switch it to the D:/ but git says:fatal: Not a git repository (or any of the parent directories): .git what the – 黃天貓 Jan 10 '18 at 05:47
  • @黃天貓 You do a `git init .` only in the folder which contains your project. That is not `D:\` (you don't want *all* files in D:\ to be in a Git repo) but cd `D:\path\to\my\project`, then `git init .` – VonC Jan 10 '18 at 05:48