First PR is gh pr create, not a website click

The first real PR is gh pr create in the terminal.

Clicking Compare & pull request after git push is the long way. The first real PR is gh auth login, then gh pr create; success prints the PR URL. To put branch and base on one sheet, start a room。

The GitHub CLI manual: when the current branch is not fully pushed, gh pr create asks where to push and can offer a fork. Do not push first, then hunt the website.

gh auth loginpush when promptedgh pr create

Finish the first PR in the terminal

  1. 01
    Log in before you open the site

    Install gh from cli.github.com. Default host is github.com. Run gh auth login: the default is a browser OAuth flow; the token goes in the system credential store. Use gh auth status to see the host and where the token lives.

  2. 02
    Create from the feature branch

    Check out the branch you want merged. If it is not fully pushed, the command prompts for a remote. --head skips forking or pushing. Set the merge target with --base; otherwise gh-merge-base, then the repo default branch.

  3. 03
    Pass title and body as flags

    Interactive mode asks for Title and Body. Skip with --title and --body. --fill uses commit messages; flags win if both are set. Success prints the PR URL. Alias: gh pr new.

  4. 04
    --web sends you back to the browser

    gh pr create --web only opens the create page. First success is a printed https://github.com/…/pull/N, not another Compare click.

gh auth login
gh auth status

# on your feature branch:
gh pr create --title "The bug is fixed" --body "Everything works again"

# or fill title/body interactively; push when prompted
# docs: cli.github.com/manual/gh_pr_create

You think a PR exists. It does not

ActionYou assumeWhat happens
git push then GitHub in a browserA PR already existsOnly a remote branch exists until you create a pull request
gh pr create --webThe CLI already opened the PRIt only opens the browser create page
gh pr create with no loginIt will finish login and create in one goRun gh auth login first; default is the browser flow
--fill + --titleBoth get concatenatedTitle and body flags overwrite autofill

After the first PR, still watch these

Draft
--draft still prints a URL; the PR is not ready to merge.
Reviewers
--reviewer login or a team handle. Official example: gh pr create --reviewer monalisa,hubot --reviewer myorg/team-name.
Dry-run
--dry-run prints details instead of creating a PR. The manual says it may still push git changes.

To mark base, head, and reviewers on one sheet for the team, open a frogmeet room: send the id, about one hour, eight people max, no account. Details on features。

FAQ

gh says you are not authenticated?

Run gh auth login. Default host github.com, browser flow. Enterprise: --hostname. Or --with-token with a classic PAT on stdin (minimum scopes: repo, read:org, gist).

It asks where to push?

The current branch is not fully on a remote. That prompt is expected. Pick a remote or fork; use --head to skip fork/push.

How is this different from Compare on the website?

Compare still leaves the terminal. gh pr create prints the URL on success. Only --web opens the browser create page.

Start a room