code: def generate_config(ctx):
      
      path = click.prompt('Please specify a location for the sample gitlint config file', default=DEFAULT_CONFIG_FILE)
      path = os.path.abspath(path)
      dir_name = os.path.dirname(path)
      if not os.path.exists(dir_name):
          click.echo(u"Error: Directory '{0}' does not exist.".format(dir_name), err=True)
          ctx.exit(USAGE_ERROR_CODE)
      elif os.path.exists(path):
          click.echo(u"Error: File \"{0}\" already exists.".format(path), err=True)
          ctx.exit(USAGE_ERROR_CODE)
  
      LintConfigGenerator.generate_config(path)
      click.echo(u"Successfully generated {0}".format(path))
      ctx.exit(0)
docs: Generates a sample gitlint config file.