Git Remove Tracked Files from Repository
If you need to Remove some Tracked files from your git Repository you have to Reset the Cached Index.
You can remove a single file with the Command:
But if you need to Un-track Multiples Files it's best the Remove the Entire Index with:
After you can Insert the files you don't want git follow to Track inside the .gitignorefile.
Next you need to Rebuild your git Index by the Usual git Command:
You Reset your Head with:
Last you have to Commit your new Repo Version:
Now your Repository do Not will Track those files again...)
You can remove a single file with the Command:
git rm -r --cached fileName
But if you need to Un-track Multiples Files it's best the Remove the Entire Index with:
git rm -r --cached .
After you can Insert the files you don't want git follow to Track inside the .gitignorefile.
Next you need to Rebuild your git Index by the Usual git Command:
git add .
You Reset your Head with:
git reset head
Last you have to Commit your new Repo Version:
git commit -m "Removed files in .gitignore from the Index"
Now your Repository do Not will Track those files again...)