Submitted by Dmitro on Thu, 25/07/2024 - 19:39 To remove files from the GIT repository based on .gitignore, without deleting them from the local file system:git ls-files -i -c -X .gitignore | xargs git rm --cached drupal git