Add a safe.directory to your repository!

Make GIT a Habit

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!