GH-PROJECT-LINK(1)

okay so this is the gh-project-link page from the GitHub CLI manual β€” it's the lil command that links a project to a repository or a team πŸŽ€ and honestly? it's giving connector energy, it's giving "let me introduce these two" ✨


πŸ¦‹ NAME πŸ¦‹

gh-project-link β€” link a project to a repository or a team 🫢


🌸 SYNOPSIS 🌸

gh project link [<number>] [flags]

so yeah, you pass an optional project number, plus whatever flags your heart desires, and boom β€” linked πŸ”₯


✨ OPTIONS ✨

  • --owner <string> β€” the login of the owner, bestie πŸ’–. Wanna rep yourself? use "@me" for the current user, slay πŸ‘‘
  • -R, --repo <string> β€” the repository that's gonna get linked to this project 🌈 this is the repo-side of the situationship
  • -T, --team <string> β€” the team you wanna link to this project πŸ¦‹ team-side, no cap

πŸ’€ EXIT CODES πŸ’€

lowkey important, so pay attention πŸ‘€ here's what the numbers mean when the command dips out:

  • 0 β€” successful execution ✨ it ate, no notes
  • 1 β€” error 😭 something went sideways
  • 2 β€” command canceled πŸ™ˆ you (or something) hit the brakes
  • 4 β€” authentication required πŸ” like, log in first bestie
NOTE: specific commands may have additional exit codes. refer to the command's help for more information πŸ’… β€” yes, i'm being fr fr, go check the help if you need the full tea.

πŸ“ EXAMPLE πŸ“

okay here's where it gets iconic, live demos:

# Link monalisa's project 1 to her repository "my_repo"
$ gh project link 1 --owner monalisa --repo my_repo
# Link monalisa's organization's project 1 to her team "my_team"
$ gh project link 1 --owner my_organization --team my_team
# Link monalisa's project 1 to the repository of current directory if neither --repo nor --team is specified
$ gh project link 1

see that last one? if you don't specify --repo or --team, it goes for the repository of the current directory 🧚 sneaky but cute.


πŸŽ€ SEE ALSO πŸŽ€

  • gh-project(1) β€” the whole project family, go meet the relatives πŸ’œ

and that's the page!! 🌟 this masterpiece is from GitHub CLI v2.102.0, dated Oct 2026 β€” mwah, go link some stuff bestie πŸ’…πŸ’–

πŸ“¦ where this page comes from