-4

I have this Python Project in eclipse and in every run he creates these .pyc files. How can I make git ignore these files. I know how to ignore a certain file with .gitignore but is it possible to ignore all files with a certain extension?

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Tessnim
  • 434
  • 9
  • 29

2 Answers2

1

Say you want to ignore file with extensions .pyc, .info and .ini

add the following lines in your .gitignore file

*.pyc
*.info
*.ini
anand
  • 1,506
  • 14
  • 28
0

Try with this This is my .gitignore


# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Jyothis T S
  • 109
  • 6