Skip to main content
commitdog pr does different things depending on which branch you are on. On a feature branch it walks you through creating a pull request: you review a diff, enter a title and description, and commitdog creates the PR and opens it in your browser. On main or master it fetches all open PRs, lets you navigate them with keyboard shortcuts, view their diffs, and merge or close them without leaving the terminal.
commitdog pr works with GitHub only. Configure your GitHub token with commitdog setup before using this command.

Usage

The behavior is determined automatically by your current branch.

Creating a PR

1

Review the diff

commitdog shows an interactive list of files changed between your branch and the base branch, with insertion and deletion counts for each file. Navigate with j/k or the arrow keys and press d to view the inline diff for any file. Press q to proceed.
2

Enter a title and description

commitdog pre-fills the title with your last commit subject. Press Enter to accept it or type a replacement. The description is optional.
3

PR is created and opened

commitdog calls the GitHub API and prints the PR number and URL:
Press Enter or y to open the PR in your default browser.