![]() gitconfig file which has a section that cotains folders that are deemed safe. It's Ok if you have a one repo, but if you're like dozens you use regularily this gets old in a hurry.gitconfig FoldersĪnother way that lets you add folders more easily in bulk is via the. While that's better it's still a hassle as you still have to type out or copy the folder name which can be lengthy. Stored in my utilities folder that's on the global path. Git config -global -add safe.directory $args ![]() What I've done originally is create a small powershell script called gitSafeDir.ps1 that makes this a little more palatable to my limited memory: # gitSafeDir This works fine, but it's a long command and you have to essentially do this for each and every repository - you can't use top level folders and have it recurse down the hierarchy. The most obvious solution is to run the command that the Git error suggests, which uses git config to add the folder to folder list: git config -global -add safe.directory
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |