My initial commit contained some log files. I\'ve added *log to my .gitignore, and now I want to remove the log files from my repository.
*log
.gitignore
You can also remove files from the repository based on your .gitignore without deleting them from the local file system :
git rm --cached `git ls-files -i -X .gitignore`
Or, alternatively, on Windows Powershell:
git rm --cached $(git ls-files -i -X .gitignore)