3 ms·
This is great. I was just looking for a way to merge pull requests from the command line today. (By which I mean fetch the branch into my local repo and perform
by rcthompson 11y ago
This is great. I was just looking for a way to merge pull requests from the command line today. (By which I mean fetch the branch into my local repo and perform the merge with git, not just having a bash script to press the merge button on Github.)
- accatyyc 11y agoI hope this is very ironic (?) edit removed unnecessary comment. What I mean is that you can already do this with git, nothing else required. git remote add fork fork@github.com && git merge fork/pr-branch
- gbtxg 11y agoWell actually you can do it without even adding a remote. git pull https://github.com/otheruser/repo.git branchname so your example will become git pull fork@github.com pr-branch
- rcthompson 11y agoYeah, I want to do it without adding a remote for every person who sends a pull request. I presume this is git with the "hub" wrapper provided by github? Oh, and I know I can pull directly from the appropriate URL, but I still have to browse to the pull request to get the URL for the associated branch. At that point I may as well just hit the merge button while I'm there.