So, I have the next problem.
For example my gitignore file contains this:
/app/config
/app/tmp
/plugins
/vendors
If this is my first push to bared remote git server after that described files won't be sended.
But if I at least one time sended this files without gitignore, then made gitignore contains:
/app/config
/app/tmp
/plugins
/vendors
Git will push this files too. So, how can I gitignore already pushed files for the next commits?
You cannot remove them from history without breaking everything for people which have already cloned your repository, and that is hard and time-consuming anyway. Just remove them with
git rm <...>
and push your changeset.