3/27/21

REMOVE GIT FROM CLONED REPOSITORY:

Using the command prompt

The rmdir or rd command will not delete/remove any hidden files or folders within the directory you specify, so you should use the del command to be sure that all files are removed from the .git folder.

  1. Open the command prompt
    1. Either click Start then Run or hit the Windows key key and r at the same time.
    2. Type cmd and hit enter
  2. Navigate to the project directory, i.e. – cd path_to_your_project
  1. Run these commands
    1. del /F /S /Q /A .git
    2. rmdir .git

The first command removes all files and folder within the .git folder. The second removes the .git folder itself.

No command prompt

  1. Open the file explorer and navigate to your project
  2. Show hidden files and folders – refer to this article for a visual guide
    1. In the view menu on the toolbar, select Options
    2. In the Advanced Settings section, find Hidden files and Folders under the Files and Folders list and select Show hidden files and folders
  3. Close the options menu and you should see all hidden folders and files including the .git folder.

    Delete the .git folder Delete the .gitignore file ** (see note at the top of this answer)