Add the .idea directory to .gitignore to avoid committing local IDE files managed by PyCharm.