temporarily take them out of your .gitignore, then
git rm --cached -- .mdf and
git rm --cached -- .ldf.
This will remove the files from the index while keeping them on disk . When done,
git commit -m "removing crap from repo" and restore your .gitignore.
If you don't want to play around with your .gitignore, you could use update-index :
git update-index --assume-unchanged -- .mdf and
git update-index --assume-unchanged -- .ldf.
This will force git to see the files as unchanged even if they were.
http://stackoverflow.com/questions/11792461/visual-studio-gitignore-and-mdf-ldf-files
Two possible solutions:
temporarily take them out of your .gitignore, then git rm --cached -- .mdf and git rm --cached -- .ldf. This will remove the files from the index while keeping them on disk . When done, git commit -m "removing crap from repo" and restore your .gitignore.
If you don't want to play around with your .gitignore, you could use update-index : git update-index --assume-unchanged -- .mdf and git update-index --assume-unchanged -- .ldf. This will force git to see the files as unchanged even if they were.