git - It costs 1 min to read
git filter-branch -f --index-filter \ 'git rm --cached --ignore-unmatch config/database.yml'

Nếu đã commit lên Remote Server thì cần git push force để push thay đổi này lên remote server. (Tuy nhiên cần cẩn thận khi sử dụng git push force)