Help with using Git for version control

I just found how to set up external version control with Unity but I am having problems as I entered /Library/ to be ignored in the .gitignore file but it still pushes those files to the repository. anyone that uses git know why it doesn’t ignore that folder?

Did you do a commit before you added them, perhaps?

If not, you may need to add some wildcards (*). Also note that you probably do want the .assets included in git. Here is the .gitignore from my project:

.DS_Store
Temp/*
Library/previews/*
Library/ScriptAssemblies/*
Library/cache/*
Library/metadata/*
Library/*
!Library/*.asset

*.userprefs
*.sln

Once a file has been committed to git any ignore rules which include it do not apply to it. Remove it from version control by committing deletion of the file.