class_docstr: File-based Code Driver handles source control management for the project with files
      
class_docstr_tok: ["File-based","Code","Driver","handles","source","control","management","for","the","project","with","files"]
docstr: Returns a boolean if the commit exists
  
  Parameters
  ----------
  commit_id : str
      commit id to check for
  
  Returns
  -------
  bool
      True if exists else False
  
  Raises
  ------
  CodeNotInitialized
      error if not initialized (must initialize first)
docstr_tok: ["Returns","a","boolean","if","the","commit","exists","Parameters","--","--","--","--","--","commit_id",":","str","commit","id","to","check","for","Returns","--","--","--","-","bool","True","if","exists","else","False","Raises","--","--","--","CodeNotInitialized","error","if","not","initialized","(","must","initialize","first",")"]
code: def exists_ref(self, commit_id):
      """Returns a boolean if the commit exists
  
      Parameters
      ----------
      commit_id : str
          commit id to check for
  
      Returns
      -------
      bool
          True if exists else False
  
      Raises
      ------
      CodeNotInitialized
          error if not initialized (must initialize first)
      """
      if not self.is_initialized:
          raise CodeNotInitialized()
      # List all files in code directory
      commit_hashes = self.list_refs()
      # Check if commit_id exists in the list
      if commit_id in commit_hashes:
          return True
      return False
  
imports: import os
  import shutil
  import errno
  import pathspec
  import tempfile
  import hashlib
  import checksumdir
  from datmo.core.util.misc_functions import list_all_filepaths
  from datmo.core.util.i18n import get
  from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, UnstagedChanges, CodeNotInitialized, CommitDoesNotExist
  from datmo.core.controller.code.driver import CodeDriver
label_desc: Use image node_id 13 for calling the FileCodeDriver obj's underlying member method code with example usage: obj.exists_ref(commit_id) and returns: False, True