code: def _get_git_tracked_files(rootdir='.'):
      
      try:
          with open(os.devnull, 'w') as fnull:
              git_files = subprocess.check_output(
                  [
                      'git',
                      'ls-files',
                      rootdir,
                  ],
                  stderr=fnull,
              )
  
          return set(git_files.decode('utf-8').split())
      except subprocess.CalledProcessError:
          return None
docs: Parsing .gitignore rules is hard.
  
      However, a way we can get around this problem by just listing all
      currently tracked git files, and start our search from there.
      After all, if it isn't in the git repo, we're not concerned about
      it, because secrets aren't being entered in a shared place.
  
      :type rootdir: str
      :param rootdir: root directory of where you want to list files from
  
      :rtype: set|None
      :returns: filepaths to files which git currently tracks (locally)