{"id":19342976,"url":"https://github.com/floatplane/git_pr","last_synced_at":"2025-07-18T05:36:35.383Z","repository":{"id":21336373,"uuid":"24653239","full_name":"floatplane/git_pr","owner":"floatplane","description":"A command-line utility for creating, viewing, diffing, and merging GitHub pull requests","archived":false,"fork":false,"pushed_at":"2018-04-09T19:03:10.000Z","size":72,"stargazers_count":6,"open_issues_count":13,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T04:44:28.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"SublimeLinter/SublimeLinter-for-ST2","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatplane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-30T19:54:00.000Z","updated_at":"2021-12-04T13:46:46.000Z","dependencies_parsed_at":"2022-08-20T19:00:39.908Z","dependency_job_id":null,"html_url":"https://github.com/floatplane/git_pr","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/floatplane/git_pr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fgit_pr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fgit_pr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fgit_pr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fgit_pr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatplane","download_url":"https://codeload.github.com/floatplane/git_pr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fgit_pr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265705617,"owners_count":23814488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:36:51.725Z","updated_at":"2025-07-18T05:36:35.357Z","avatar_url":"https://github.com/floatplane.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git_pr\n\nA command-line utility for creating, viewing, diffing, and merging GitHub pull requests.\n\n## tl;dr\n\n[![asciicast](https://asciinema.org/a/2owcxgz5r5275woapwrrdg5nz.png)](https://asciinema.org/a/2owcxgz5r5275woapwrrdg5nz?autoplay=1\u0026speed=3)\n\n## Installation\n\n`sudo gem install git_pr`\n\n## Usage\n\n```\n$ git pr help\ngit_pr version 0.0.14\n\nUsage: git pr [options] command [options]\n\nGlobal options\n    -p, --project [REMOTE|PROJECT]   The GitHub project to access. Can be a named remote, or a GitHub project in\n                                     \u003cuser\u003e/\u003cproject\u003e form. Defaults to the GitHub project that the \"origin\"\n                                     or \"upstream\" remote points to. You can override the default remote\n                                     with git config. Run: 'git config --add pr.defaultremote \u003cremote_name\u003e'\n    -h, --help                       Show help\n    -v, --verbose                    Verbose output\n    -V, --version                    Print version\n\nValid commands:\n    diff:     Use \"git diff\" to display a diff for a pull request\n    difftool: Like \"diff\", but uses \"git difftool\" instead\n    list:     List open pull requests\n    status:   Show the detailed status for a pull request\n    merge:    Merge and close a pull request\n    open:     Open a PR page on the web\n\nRun \"git pr help \u003ccommand\u003e\" for more detailed help.\n```\n\n### Opening a pull request\n\n```\n$ git pr help open\nUsage: git pr open [pr_number|branch]\n\nOpen a pull request page, if one exists, for the passed in PR number or\nbranch. Otherwise, open a diff page where a pull request can be created. If no\nargument is passed, open a PR page for the current branch.\n```\n\n### Listing open pull requests\n\n```\n$ git pr help list\nUsage: git pr list [options]\n\nList command options\n    -u, --user [USERNAME]            Only list PRs for the named GitHub user\n    -s, --[no-]status                Include PR status in the output. Including status is slower,\n                                     as each PR's status must be queried individually. You can set\n                                     the default behavior with git config:\n                                     \n                                     git config --bool --add pr.liststatus true\n```\n\n### Diffing a pull request\n\n```\n$ git pr help diff\nUsage: git pr diff [PR number] [-- [additional options]]\n\nFetch the latest changes for the specified PR, and then run \"git\ndiff\". Additional options are passed to the \"git diff\" command.\n```\n\nIf the pull request doesn't exist locally, git_pr will fetch the branch, setting\nup a remote if necessary. Not surprisingly, `git pr difftool` is identical in\nbehavior, except for invoking `git difftool` under the covers.\n\n### Getting CI status\n\n```\n$ git pr help status\nUsage: git pr status [pr_number|branch]\n\nReport detailed pull request status for the passed in PR number or\nbranch.\n```\n\nNote that you can also use `git pr list --status`, although it's quite a bit\nslower, as it involves an additional request per open PR.\n\n### Merging\n\n```\n$ git pr help merge\nUsage: git pr merge [PR number]\n\nIf a PR number isn't passed, a menu of open PRs will be displayed.\n\nMerge command options\n    -y, --yolo                       Don't check PR status before merging\n```\n\n__Note__: `git pr merge` is opinionated, and tries to perform a \"clean\" merge in order to\nmaintain linear history. When you run `git pr merge`, the following happens:\n\n1. Source and target branches are updated\n1. Source branch is rebased on top of the target branch\n1. Source branch is pushed to its remote\n1. Source branch is merged into the target branch (with `--no-ff`, so a merge\n   commit is always created)\n1. User is prompted to confirm the merge (see screencast above)\n\n## Useful tips\n\n- You can shorten command words quite a bit:\n\nCommand | Accepted abbreviations\n--- | ---\n`list` | `l`, `ls`\n`open` | `o`, `web`\n`diff` | `d`\n`difftool` | `dt`\n`status` | `s`\n`merge` | `m`\n\n- Most commands will look at the current branch and try to do the right thing,\n  without requiring you to pass a PR number or a branch. This includes `open`,\n  `diff`, `difftool`, `status` and `merge`.\n\n- You can force a merge even if CI fails with `git pr merge --yolo`\n\n## Configuration\n\ngit_pr tries to make sane assumptions about your setup, but can get confused by\nnon-standard names for remotes. In particular, you may need to specify which\nGitHub project is the target for pull requests. This can be done on a one-time\nbasis with the `--project` option:\n\n```bash\n$ git pr --project floatplane/git_pr ls\n#39 from floatplane: Add a readme, finally\n```\n\nYou can also set this value on a per-repository basis via `git config`. See\n[Usage](#usage) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatplane%2Fgit_pr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatplane%2Fgit_pr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatplane%2Fgit_pr/lists"}