Remove GIT repository folder without deleting it from your local files

How could I remove folders from my GIT repository without deleting them from my local files?

  1. Add the folder to your “.gitignore” file, so it won’t appear to be added again when you are tracking new changes
  2. Remove the folder from tracking without deleting from local files:

git rm -r –folder_path/

  1. Push these changes to your repository.

Leave a Reply