So based on what you said, these files are libraries/documentation you don't want to delete but also don't want to push to
github. Let say you have your project in folder
your_project and a doc directory:
git rm --cached doc/*
.gitignore, you can make one right inside of your project folder:
doc/*in the .gitignore
git add project/.gitignore
git commit -m "message".