I'm working first time on git. I have pushed my branch on github and it pushed all the library and documents into the github. Now what can I do and how can I use gitignore command to avoid the same mistake again.
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".