2

I am trying to ignore the .pyc files in my folder and do not want to add them to my repository and i already created the gitignore file.

My gitignore file looks like this:

#python specific
*.pyc

##generic files to ignore
*~
*.lock
*.DS_Store
*.swp
*.out

Besides the .pyc file i want to ignore some other basic generic files. But when i type git add ., it still adds the .pyc files.

How do i solve this problem?Need some help...

4

1 回答 1

3

git expects the file to be named .gitignore, not gitignore (note the period at the start of the file name).

于 2012-06-06T14:57:49.267 回答