Add a safe.directory to your repository!

Redge ShepherdRedge Shepherd
1 min read

I recently added a new 20GB external hard drive to my system. I added a code directory that contains some of my Tcl/Tk files. After creating and attempting to add a file to the repository, I received the following error:

F:\Code\TclTk\ReadKey>git add ReadKey.tcl fatal: detected dubious ownership in repository at 'F:/Code/TclTk/ReadKey' 'F:/Code/TclTk/ReadKey' is on a file system that doesnot record ownership To add an exception for this directory, call:

git config --global --add safe.directory F:/Code/TclTk/ReadKey

After entering the above command, I can use git to work on my project on my new drive!

git continues to surprise me and it only gets better.

We learn something new every day!

0
Subscribe to my newsletter

Read articles from Redge Shepherd directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Redge Shepherd
Redge Shepherd

I have over 40 years of programming experience using a variety of languages over the course of my career to develop real-time solutions for real-world problems. Keyboards connect us to the world and, as a keyboard enthusiast, I am searching for the ideal keyboard.