I have removed some files (a.py and b.py) from project and committed my changes. My teammate pulled changes and program exited with errors.
After some research we have found problem:
Git removed a.py and b.py files, but compiled .pyc files remained and caused problems - program used old sources and get an errors. 
.pyc files ignored in .gitignore.
What is the best solution to solve such problem?
UPDATE: I know how to ignore files - question not about it. Question is how to avoid situations described above?
 
     
     
     
     
     
     
    