how to skip .pyc file adding into github repository

C++
# create one file into scrapy project with name of 
.gitignore
#add one line into that file 
*.pyc
# and save it. it will skip the file adding into git repo
Source

Also in C++: