code: def get_git_home(path='.'):
      
      ctx = click.get_current_context(silent=True)
      if ctx and GIT_KEY in ctx.meta:
          return ctx.meta[GIT_KEY]
  
      from git import Repo
      return Repo(path, search_parent_directories=True).working_dir
docs: Get Git path from the current context.