gitgithub

Untracking C drive in git


I mistakenly dìd git init in my C drive and git start tracking the whole of my C drive. Would anyone know how do I stop or untrack this feature, please? I have tried to delete the repository on gitHub but every time I try to create a repository in any folder on my C drive I end up getting the same error returned while pushing.


Solution

  • A git repository can be removed by removing the .git folder. You can enable showing hidden folders by using the following steps:

    1. In the search box on the taskbar, type folder, and then select Show hidden files and folders from the search results.
    2. Under Advanced settings, select Show hidden files, folders, and drives, and then select OK.

    Then finding and deleting the .git folder.

    More info about showing hidden files: https://support.microsoft.com/en-us/help/14201/windows-show-hidden-files