正式なドキュメントは英語版であり、この日本語訳はAI支援翻訳により作成された参考用のものです。日本語訳の一部の内容は人間によるレビューがまだ行われていないため、翻訳のタイミングにより英語版との間に差異が生じることがあります。最新かつ正確な情報については、英語版をご参照ください。

glab duo ask

Generate Git commands from natural language.

Synopsis

Generate Git commands from natural language using AI assistance.

Describe what you want to do in plain language, and GitLab Duo suggests the appropriate Git commands. You receive both the commands and an explanation.

After you receive the suggested commands, you can run them directly from the CLI. You must confirm each command before it runs.

Use this command to:

  • Retrieve forgotten Git commands.
  • Learn how to accomplish specific Git operations.
  • Get guidance on complex Git workflows.
  • Reduce context switching during development.
glab duo ask <prompt> [flags]

Examples

# Explain how to display the titles of the last 10 commits
$ glab duo ask how to list last 10 commit titles

# Explain how to undo the last commit
$ glab duo ask how do I undo my last commit

# Explain how to display files changed in the last commit
$ glab duo ask show me files changed in the last commit

Options

      --git   Ask a question about Git. (default true)

Options inherited from parent commands

  -h, --help   Show help for this command.