{"id":13616863,"url":"https://github.com/Mergifyio/git-pull-request","last_synced_at":"2025-04-14T03:31:48.346Z","repository":{"id":21297876,"uuid":"92072502","full_name":"Mergifyio/git-pull-request","owner":"Mergifyio","description":"Send git pull requests via command line","archived":true,"fork":false,"pushed_at":"2024-03-14T07:23:07.000Z","size":240,"stargazers_count":124,"open_issues_count":15,"forks_count":52,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-17T07:39:40.684Z","etag":null,"topics":["git","git-plugin","git-pull-request","github","pull-request","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mergifyio.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Mergifyio","custom":"https://mergify.com"}},"created_at":"2017-05-22T16:01:23.000Z","updated_at":"2025-03-09T17:32:46.000Z","dependencies_parsed_at":"2024-01-17T00:20:35.395Z","dependency_job_id":"f9b80d0c-2873-4173-b3a6-65951089db38","html_url":"https://github.com/Mergifyio/git-pull-request","commit_stats":{"total_commits":171,"total_committers":17,"mean_commits":"10.058823529411764","dds":"0.45614035087719296","last_synced_commit":"3a101a41698f854814a603885e4b5363e89fb8cb"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mergifyio%2Fgit-pull-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mergifyio%2Fgit-pull-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mergifyio%2Fgit-pull-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mergifyio%2Fgit-pull-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mergifyio","download_url":"https://codeload.github.com/Mergifyio/git-pull-request/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248815584,"owners_count":21165951,"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-plugin","git-pull-request","github","pull-request","pull-requests"],"created_at":"2024-08-01T20:01:34.227Z","updated_at":"2025-04-14T03:31:43.331Z","avatar_url":"https://github.com/Mergifyio.png","language":"Python","readme":"==================\n git-pull-request\n==================\n\n.. image:: https://badge.fury.io/py/git-pull-request.svg\n    :target: https://badge.fury.io/py/git-pull-request\n\ngit-pull-request is a command line tool to send Bitbucket_, GitHub or Pagure_ pull-request\nfrom your terminal.\n\nInstallation\n============\n\nUse the standard Python installation method::\n\n  pip3 install git-pull-request\n\nAlthough it might not be up to date with the `latest code on GitHub \u003chttps://github.com/jd/git-pull-request\u003e`_\n`Fedora \u003chttps://getfedora.org\u003e`_ 28+ users can also download straight via package manager\n`DNF \u003chttps://fedoraproject.org/wiki/DNF\u003e`_::\n\n  sudo dnf install git-pull-request\n\nUsage\n=====\nOnce you've made your commits into a branch, just type::\n\n  git pull-request\n\nThis will:\n\n1. Fork the upstream repository into your account (if needed)\n2. Add your forked repository as a remote named \"github\" (if needed)\n3. Force push your current branch to your remote\n4. Create a pull-request for your current branch to the remote matching branch,\n   or master by default.\n\nIf you add more commits to your branch later, or need to rebase your branch to\nedit commits, you'll just need to run `git pull-request` to update your\npull-request. git-pull-request automatically detects that a pull-request has\nbeen opened for your current working branch.\n\nWorkflow advice\n===============\n\nCaching Credentials\n-------------------\n\nGitHub has a good documentation about using `git credential\n\u003chttps://help.github.com/en/articles/caching-your-github-password-in-git\u003e`_.\n\nThe full documentation is available on the `git-scm.com website\n\u003chttps://git-scm.com/book/en/v2/Git-Tools-Credential-Storage\u003e`_.\n\nBitbucket App Passwords\n-----------------------\n\nBitbucket uses an App password, you need to create one by visiting `your personal settings\n\u003chttps://bitbucket.org/account/settings/app-passwords/\u003e`_\nand adding `Repositories:Write` and `Pull requests:Write` permissions.\n\nGitHub\n------\n\nIf you set up 2-Factors Authentication for your GitHub account, you\nshould `create a personal token\n\u003chttps://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line\u003e`_\nand request the `repo` permission, then use that as your password.\n\nPagure Token\n------------\n\nPagure uses API key, you need to create one by visiting `your settings\n\u003chttps://pagure.io/settings#nav-api-tab\u003e`_\nand requesting the `Fork a project` and `Modify an existing project` ACL.\n\nCreating Branches\n-----------------\n\nWhen sending pull-requests, it's preferable to do so from your own branch. You\ncan create your own branch from `master` by doing::\n\n  $ git checkout -b myownbranch --track origin/master\n\nThis will checkout a new branch called `myownbranch` that is a copy of master.\nUsing the `--track` option makes sure that the upstream source branch is\nwritten in your `.git/config` file. This will allow git-pull-request to know to\nwhich branch send the pull-request.\n\nSince this is long to type, you can use an alias in git to make it faster::\n\n  $ git config --global alias.nb '!git checkout --track $(git config branch.$(git rev-parse --abbrev-ref HEAD).remote)/$(git rev-parse --abbrev-ref HEAD) -b'\n\nThis will create a `git nb` alias that will create a new branch tracking the\ncurrent branch and checking it out. You can then use it like that::\n\n  $ git nb foobar\n  Branch foobar set up to track remote branch master from origin.\n  Switched to a new branch 'foobar'\n\nConfiguration via `git config`\n------------------------------\n\nMost `git-pull-request` command line arguments can be store into your git\nconfiguration.\n\nFor a particular repository, if you get tired of using::\n\n  $ git pull-request --fork never\n\nYou can set the option with git and use the command without any arguments::\n\n  $ git config git-pull-request.fork never\n  $ git pull-request\n\nYou can also set the option globally to have a custom default for all your\nrepositories with::\n\n  $ git config --global git-pull-request.fork always\n  $ git pull-request\n\n\nDifference with hub\n===================\nThe wrapper `hub`_ provides `hub fork` and `hub pull-request` as\ncommand line tools to fork and create pull-requests.\n\nUnfortunately, it's hard to combine these tools in an automated implementation for a\ncomplete workflow.\n\nFor example:\nIf you need to update your pull-request, there's no way to identify existing pull requests, so\ncalling `hub pull-request` would just open a new pull-request.\n\ngit-pull-request wraps all of these operations into one convenient tool.\n\n.. _hub: https://hub.github.com/\n.. _Bitbucket: https://bitbucket.org\n.. _Pagure: https://pagure.io/pagure\n","funding_links":["https://github.com/sponsors/Mergifyio","https://mergify.com"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMergifyio%2Fgit-pull-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMergifyio%2Fgit-pull-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMergifyio%2Fgit-pull-request/lists"}