Skip to content

Instantly share code, notes, and snippets.

@Korveld
Created June 3, 2024 18:55
Show Gist options
  • Save Korveld/d2cd953756ae2f6e4ac74dead60a086c to your computer and use it in GitHub Desktop.
Save Korveld/d2cd953756ae2f6e4ac74dead60a086c to your computer and use it in GitHub Desktop.
Remove a folder from git tracking
Step 1. Add the folder path to your repo's root .gitignore file.
path_to_your_folder/
Step 2. Remove the folder from your local git tracking, but keep it on your disk.
git rm -r --cached path_to_your_folder/
Step 3. Push your changes to your git repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment