def repo_root
      return git_directory_path if inside_bare_repo?
      
      if inside_git_directory?
        File.expand_path('..', git_directory_path)
      elsif inside_work_tree?
        execute(git_cmd('rev-parse', '--show-toplevel'))
      else
        raise 'not in git directory or work tree!?'
      end
    end
def repo_root
      return git_directory_path if inside_bare_repo?
      
      if inside_git_directory?
        File.expand_path('..', git_directory_path)
      elsif inside_work_tree?
        execute(git_cmd('rev-parse', '--show-toplevel'))
      else
        raise 'not in git directory or work tree!?'
      end
    end
Returns the absolute path to the root of the current git directory

 @return [String] the path