Github CLI 사용법
Last updated
# Viewing a list of open issues
~/Projects/my-project$ gh issue list
Issues for owner/repo
#14 Update the remote url if it changed (bug)
#14 PR commands on a detached head (enhancement)
#13 Support for GitHub Enterprise (wontfix)
#8 Add an easier upgrade command (bug)
~/Projects/my-project$# Create an issue interactively
~/Projects/my-project$ gh issue create
Creating pull request for feature-branch into main in owner/repo
? Title My new issue
? Body [(e) to launch nano, enter to skip]
http://github.com/owner/repo/issues/1
~/Projects/my-project$# Create an issue using flags
~/Projects/my-project$ gh issue create --title "Issue title" --body "Issue body"
http://github.com/owner/repo/issues/1
~/Projects/my-project$// Quickly navigate to the issue creation page
~/Projects/my-project$ gh issue create --web
Opening https://github.com/owner/repo/issues/new in your browser.
~/Projects/my-project$gh issue close {<number> | <url>} [flags]// Checking out a pull request locally
~/Projects/my-project$ gh pr checkout 12
remote: Enumerating objects: 66, done.
remote: Counting objects: 100% (66/66), done.
remote: Total 83 (delta 66), reused 66 (delta 66), pack-reused 17
Unpacking objects: 100% (83/83), done.
From https://github.com/owner/repo
* [new ref] refs/pull/8896/head -> patch-2
M README.md
Switched to branch 'patch-2'
~/Projects/my-project$gh pr diff [<number> | <url> | <branch>] [flags]gh pr merge [<number> | <url> | <branch>] [flags]gh pr close {<number> | <url> | <branch>} [flags]