Run the following code:
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch file-path'
Alternatively:
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch app/views/index.html.erb' --prune-empty --tag-name-filter cat -- --all
Learn more: http://stackoverflow.com/a/23188613