There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. they may be ignored system-wide.
Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.
git config --global core.excludesfile ~/.gitignore
git config --global core.excludesfile %USERPROFILE%\.gitignore