glab(1)

πŸ’… glab β€” the glab(1) manual, but make it make sense

okay so bestie, you're reading the manual for glab, and this particular page is about glab-repo-remote-add β€” literally the glow-up your Git remotes have been waiting for. no cap, it's a tiny command and it absolutely ate. πŸŽ€


✨ NAME ✨

glab-repo-remote-add β€” add a Git remote for a GitLab project. that's it, that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

glab repo remote add  [flags]

(yes there are two spaces before [flags], no we're not fixing it, it's part of the lore πŸ’€)


✨ DESCRIPTION ✨

so here's the tea πŸ“ β€” this command adds a Git remote for a GitLab project, and you point at the project using a project reference. like namespace/project, you know the drill.

the remote name defaults to the first path component (that's the namespace, bestie), which means the remote name itself tells you where the repo lives. main character naming behaviour, honestly. πŸ‘‘


✨ OPTIONS ✨

  • -n, --name="" β€” the name you want for the remote. default? the first path component. cute and automatic. ✨
  • -p, --protocol="" β€” which Git protocol to use: ssh or https. default comes from the git_protocol config, so it already knows what you like. 🫢

✨ OPTIONS INHERITED FROM PARENT COMMANDS ✨

  • -h, --help[=false] β€” show help for this command. the classic. the icon. πŸ’…

✨ EXAMPLE ✨

here's where it gets good β€” copy these, they're literally right there:

# 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

see how the first one names the remote alice? that's the first path component doing its thing. and the subgroup one names the remote group β€” iykyk. 🧚


✨ SEE ALSO ✨


lowkey reminder: the remote name defaults to the first path component, so if you assumed anything else you're gonna have a bad time 😭 set --name if you want something else, fr fr.

that's the whole page bestie, hope it slayed πŸ’–

this beauty was Auto generated by spf13/cobra, dated Nov 2026, and it lives on the glab(1) manual page β€” catch you in the next one, mwah 🫢✨

πŸ“¦ where this page comes from