GitHub CLI(gh) 설치: auth login, clone, Issue·Pull Request 만들기
gh 설치 후 인증, clone, Issue·PR을 CLI에서 완료.
GitHub CLI(gh)로 로그인, clone, Issue, Pull Request를 터미널에서 처리합니다. macOS/Linux/Windows 설치, gh auth login, gh repo clone, gh issue create, gh pr create를 hereink 독자용으로 정리합니다.
검색어: GitHub CLI gh 설치 auth login clone Issue PR 만들기. gh 설치·인증·clone·Issue·PR 한 번씩이 목표입니다.
설치brew · apt · winget
인증gh auth login
협업clone · issue · pr
installauth loginclone / issue / pr
gh가 해결하는 것
터미널 GitHub
gh repo clone, gh pr create를 git과 같은 화면에서.
git과 분담
커밋은 git, PR 메타데이터는 gh.
공식:
github.com/cli/cli,cli.github.com.gh --version.
설치
- 1macOS
brew install gh. - 2Linux
공식 apt 후
sudo apt install gh, Fedoradnf install gh. - 3Windows
winget install GitHub.cli. - 4PATH
명령 없으면 PATH 확인.
gh auth login
gh auth login
gh auth statusgh repo clone
gh repo clone cli/cli
gh repo clone owner/repo -- --depth=1gh issue create
gh issue create --title "Fix timeout" --body "…"
gh issue create --label documentationgh pr create
- 1push
git push -u origin branch. - 2PR
gh pr create --title "…" --body "…". - 3옵션
--draft,--reviewer,--base main.
auth login 실패?
PAT, 프록시, SSO 승인 확인. cli.github.com.
gh clone 필수?
아니요. GitHub remote만 있으면 됩니다.
Desktop vs gh?
GUI는 Desktop, 스크립트·CLI는 gh.