0

I recently re-installed Windows on my computer. When I try to use Git in the workspaces on my other drive - which was left unchanged between Windows installations - it gives a warning due to a mismatch in user ID's:

max@DESKTOP-EA1LBGP MINGW64 /d/Documents/Software/development-documentation
$ git status
warning: 'D:/Documents/Software/development-documentation' is owned by:
        'S-1-5-21-2274877621-3312131611-2141727559-1001'
but the current user is:
        'S-1-5-21-772685654-744443855-490602743-1001'
fatal: detected dubious ownership in repository at 'D:/Documents/Software/development-documentation'
To add an exception for this directory, call:

        git config --global --add safe.directory D:/Documents/Software/development-documentation

The username - max - is the same as before, but I guess Git bash uses something in the Windows installation to determine the underlying user ID.

Should I change the user ID to match the previous user ID? If so, how do I do this? Are there any side-effects to doing this?

Or should I configure Git to ignore this error?: git config --global safe.directory '*'

Max Jacob
  • 701
  • 1
  • 9
  • 20

1 Answers1

0

You should make yourself the owner of the folder.

  • I actually tried that yesterday: `chown --recursive --verbose max development-documentation/`. But the output always shows `ownership of ... retained as max ` for each item in the directory. The error - `detected dubious ownership` - persists when I try to use Git in the directory. – Max Jacob Aug 29 '22 at 12:32