GH-CONFIG-GET(1)

πŸ’… GH-CONFIG-GET(1) πŸ’…

okay so bestie, welcome to the GitHub CLI manual β€” specifically the page for gh-config-get, which is genuinely one of the most useful little gremlins in the whole toolkit. no cap. let's get into it 🫢


✨ NAME ✨

gh-config-get β€” literally just prints the value of a configuration key you ask for. that's it. that's the whole job. and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

gh config get <key> [flags]

so you hand her a key, she hands you back the value. transactional. iconic. main character energy fr fr ✨


πŸŽ€ OPTIONS πŸŽ€

  • -h, --host <string> β€” grab the per-host setting instead of the global one. it's giving "different vibes for different hosts" and honestly? slay. takes a string for the host name πŸ’–

πŸ¦‹ EXIT CODES πŸ¦‹

this is the vibe check at the end of the run, okay? here's how she tells you how it went:

  • 0 β€” Successful execution 🌈 (ate, no notes)
  • 1 β€” Error 😭 (something went sideways)
  • 2 β€” Command canceled πŸ™ˆ (you hit the brakes)
  • 4 β€” Authentication required πŸ”₯ (she needs your creds, bestie)
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. so like, don't come for me if a different command has extra ones β€” check its help πŸ‘‘ (copying this caveat verbatim because it's literally true and not something to play with)

⭐ EXAMPLE ⭐

$ gh config get git_protocol

that's it. that's the whole demo. run it and you'll see whatever your git_protocol is set to. obsessed πŸ“


πŸ’œ SEE ALSO πŸ’œ

  • gh-config(1) β€” the parent page, go check her out too 🧚

okay bye bestie!! this page is from the GitHub CLI v2.102.0, dated Oct 2026 β€” so you know it's fresh βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from