{"id":16929799,"url":"https://github.com/ozh/git-pr","last_synced_at":"2025-04-13T09:22:24.392Z","repository":{"id":30228050,"uuid":"33779147","full_name":"ozh/git-pr","owner":"ozh","description":"git pr : easily work with PR from Github","archived":false,"fork":false,"pushed_at":"2020-04-24T15:58:04.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T00:54:57.592Z","etag":null,"topics":["git","git-addons","php","pull-request","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-11T14:40:31.000Z","updated_at":"2020-05-02T13:39:55.000Z","dependencies_parsed_at":"2022-08-03T13:45:17.942Z","dependency_job_id":null,"html_url":"https://github.com/ozh/git-pr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozh%2Fgit-pr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozh%2Fgit-pr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozh%2Fgit-pr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozh%2Fgit-pr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozh","download_url":"https://codeload.github.com/ozh/git-pr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248689382,"owners_count":21145923,"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":["git","git-addons","php","pull-request","pull-requests"],"created_at":"2024-10-13T20:40:05.546Z","updated_at":"2025-04-13T09:22:24.366Z","avatar_url":"https://github.com/ozh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git pr\n\nSimple script for `git`, to locally pull a PR from Github, with an option to _not_ commit changes\n\n## Install as a git alias:\n\nAdd this to your git config (eg `~/.gitconfig`)\n\n```ini\n[alias]\n    pr = \"!php /full/path/to/ozh_git_pr.php\"\n```\n\n## Usage\n\nAssuming you want to locally test PR #1337, just do:\n\n```sh\ngit pr 1337\n# or\ngit pr -n 1337\n```\n\nIn detail, this:\n\n* creates a new branch named `pr-1337` and switch to it\n* pulls whatever repo/branch has been submitted as the PR on Github\n* with the `-n` option, does not commit changes, so you still see what files are modified and what's changed in them\n\nThis will be equivalent to :\n\n```sh\ngit checkout -b pr-1337\ngit pull [--no-commit] https://github.com/SOMEDUDE/SOMEFORK.git SOMEBRANCH\n```\n\n#### Why a `-n` switch ? Why would I want to *not* commit changes ?\n\nWith a gigantic pull request that changes a lot of files, it can be easier to review changes, since modified files are marked (if using a tool with icon overlays, like TortoiseGit)\n\n![capture2](https://cloud.githubusercontent.com/assets/223647/25444316/f3379ad6-2aaa-11e7-8f71-2814f094b6a5.png)\n\nFrom now on you can review, of course modify, and then commit changes, or simply `git merge --abort` if proposed changes are not suitable.\n\n\n## License\n\nDo whatever the hell you want to do with it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozh%2Fgit-pr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozh%2Fgit-pr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozh%2Fgit-pr/lists"}