.nh .TH "GT-PR-CREATE" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-pr-create - Create a pull request .SH SYNOPSIS \fBgt pr create [flags]\fP .SH DESCRIPTION Create a pull request from the current branch, or from --head. .PP On a terminal without flags, gt asks for the title and body, then what to do next: submit, submit as a draft, add metadata or change the branches. Any flag of this command, such as --fill, --head or --base (but not global flags such as --repo), skips the questions: the title is then --title, else the commit message of a single-commit branch, else the branch name. .PP A branch that is not on the remote yet is pushed first, with its upstream set, after a confirmation; without a terminal, pass --yes to push it. A branch that does not track a branch of the same name yet goes to the fork when origin is a fork of the repository, or, when origin is not the repository itself or you cannot push to it, to the only remote of your own fork; otherwise it goes to the repository's remote. Without push access and a fork remote, gt offers on a terminal to fork the repository and adds the fork as the remote "fork", or one named after your login when "fork" points elsewhere; elsewhere, run gt repo fork --add-remote first. A missing base branch fails before the push. After a push to a fork, gt pr commands on the branch keep selecting the repository rather than the fork. .PP With --agit, only the author of an AGit pull request can push to it, so on a branch of someone else's, such as from gt pr checkout, pass --topic to open your own. .SS JSON FIELDS .EX assignees, author, base, body, comments, created_at, draft, due_date, head, head_remote_deleted, head_repo, head_sha, id, labels, merge_commit_sha, mergeable, merged, merged_at, merged_by, milestone, number, review_decision, reviewer_teams, reviewers, reviews, state, title, updated_at, url .EE .SH OPTIONS \fB--agit\fP[=false] Create the pull request through AGit push (refs/for) .PP \fB--allow-maintainer-edits\fP[=true] Allow maintainers to push to the head branch .PP \fB-a\fP, \fB--assignee\fP=[] Assign users by username; @me for yourself .PP \fB--attachment\fP=[] Attach a file to the pull request (repeatable) .PP \fB-B\fP, \fB--base\fP="" Base branch (default: the repository's default branch) .PP \fB-b\fP, \fB--body\fP="" Pull request body .PP \fB-F\fP, \fB--body-file\fP="" Read the body from \fBfile\fR, or - for stdin .PP \fB--deadline\fP="" Due \fBdate\fR: YYYY-MM-DD, RFC3339 or Unix timestamp; only the date counts, as the end of that day in UTC .PP \fB-d\fP, \fB--draft\fP[=false] Create a draft pull request .PP \fB-e\fP, \fB--editor\fP[=false] Write the body in your editor, starting from the repository's template .PP \fB-f\fP, \fB--fill\fP[=false] Skip the questions and take the title and body from the commits .PP \fB-H\fP, \fB--head\fP="" Head branch, or OWNER:BRANCH for a fork (default: the current branch) .PP \fB-h\fP, \fB--help\fP[=false] help for create .PP \fB-l\fP, \fB--label\fP=[] Apply labels by name; repo: or org: picks between same-named labels .PP \fB-m\fP, \fB--milestone\fP="" Milestone title or ID .PP \fB-p\fP, \fB--project\fP=[] Add the pull request to the repository's or its owner's project with this ID or \fBtitle\fR, a number being an ID first (repeatable) .PP \fB-r\fP, \fB--reviewer\fP=[] Request reviews from users .PP \fB--reviewer-team\fP=[] Request reviews from teams within the repository's organization .PP \fB-t\fP, \fB--title\fP="" Pull request title (default: the commit message of a single-commit branch, or the branch name) .PP \fB--topic\fP="" AGit topic name (default: head branch); requires --agit .PP \fB-w\fP, \fB--web\fP[=false] Open the comparison of --head and --base in the browser to create the pull request there .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--csv\fP[=""] Output CSV with the specified comma-separated \fBfields\fR, or all fields .PP \fB--cwd\fP="" Working \fBdirectory\fR for repository discovery .PP \fB--debug\fP[=false] Log the method, URL, status, and duration of each HTTP request to stderr .PP \fB--host\fP="" Gitea instance \fBURL\fR, including any base path .PP \fB--interactive\fP[=false] Allow prompts with machine output .PP \fB-q\fP, \fB--jq\fP="" Filter JSON output using a jq \fBexpression\fR; implies --json .PP \fB--json\fP[=""] Output JSON with the specified comma-separated \fBfields\fR, or all fields .PP \fB--no-input\fP[=false] Disable prompts and implicit editor/browser interactions .PP \fB--remote\fP="" Git \fBremote\fR used for repository discovery .PP \fB-R\fP, \fB--repo\fP="" Select a repository as \fBOWNER/REPO\fR or URL .PP \fB--sudo\fP="" Perform API requests as this \fBuser\fR (requires an administrator account) .PP \fB--user\fP="" Account \fBname\fR on the selected instance .PP \fB-y\fP, \fB--yes\fP[=false] Accept confirmations without prompting .SH EXAMPLE .EX # Create a pull request for the current branch interactively $ gt pr create # Take the title and body from the commits, without questions $ gt pr create --fill # In a script, also push the branch without asking $ gt pr create --fill --yes $ gt pr create -t "Add login" -b "Closes #1" -B develop -r carol -l enhancement .EE .SH SEE ALSO \fBgt-pr(1)\fP