Moves some unneeded code into the polling listener block and adds all matched .git directories as an ignored path. This prevents excessive CPU usage when dealing with submodules and frameworks checked out within a project.