0

I'm struggling to find a good workflow for managing pull requests from magit. (I am approving pull requests, not generating them.) At the moment I am using m p to preview a pull request and m m to merge it, but my autocompletion is cluttered with obsolete pull-request branches like github/pull/112. How can I get magit to ignore these closed requests?

I would be happy enough to switch to some other workflow, but I have had no luck finding anything. (I did find magit-gh-pulls, which is on MELPA if marked "obsolete," but I cannot get it to configure properly with our Github Enterprise instance, and all I learned from its messages is that it is trying to contact api.github.com.)

  • "pull-request branches like github/pull/112" - branches are not pull-requests. I guess you just need to delete those branches? – npostavs Sep 5 '18 at 22:43
  • OK, clearly I don't know what's going on. Maybe I should ask a different question: how should I be handling pull requests within magit? – Norman Ramsey Sep 6 '18 at 12:54
1

I'm struggling to find a good workflow for managing pull requests from magit.

It sounds like you're just missing the "delete after merging" step. The manual entry for magit-branch-pull-request describes the intended flow:

  • b Y (magit-branch-pull-request)

    This command creates and configures a new branch from a Github
    pull-request, creating and configuring a new remote if necessary.

    [...]

    When you later delete the local pull-request branch, then you are
    offered to also delete the corresponding remote, provided it is not
    the upstream remote and that the tracking branch that corresponds to
    the deleted branch is the only remaining tracked branch. [...]

Pull-request branches are normal branches, so they can be deleted with b k (magit-branch-delete) as usual.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.