The rules in .gitignore
only apply to untracked files. If files under that directory have already been committed into the repository, unstage them, create a commit, and push that to master.
git rm -r --cached some-directory
git commit -m 'Remove the now ignored directory "some-directory"'
git push origin master