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

glab repo remote add

Add a Git remote for a GitLab project.

Synopsis

Add a Git remote for a GitLab project using a project reference.

The remote name defaults to the first path component (the namespace), so the remote identifies where the repository lives.

glab repo remote add <namespace/project> [flags]

Examples

# Add a remote repository (remote named "alice")
glab repo remote add alice/my-project

# Add a remote repository with a custom name
glab repo remote add alice/my-project --name upstream

# Add a remote repository in a subgroup (remote named "group")
glab repo remote add group/subgroup/my-project

Options

  -n, --name string       Name for the remote (default: first path component)
  -p, --protocol string   Git protocol: ssh, https (default: git_protocol config)

Options inherited from parent commands

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