Merge Pull Request Considered Harmful
blog.spreedly.com
Merge Pull Request Considered Harmful
1–10 of 115 posts
Re: Merge Pull Request Considered Harmful
#2...but it doesn't so you have to:
- checkout a local copy
- add a remote to the PR
- checkout a new branch
- merge the PR into your local branch
- fix code, merge to master
Which is entirely true; it is annoying.The simple solution, though, is to require pull requests to come in a feature branch, and flat out reject any that target master. /shrug
Re: Merge Pull Request Considered Harmful
#3Re: Merge Pull Request Considered Harmful
#4Re: Merge Pull Request Considered Harmful
#5So basically:
git fetch origin pull/ID/head:BRANCHNAME
git checkout BRANCHNAME
And now you can edit that pull request and/or make new pull request based on the previous one. Or just simply merge in master.Re: Merge Pull Request Considered Harmful
#6Re: Merge Pull Request Considered Harmful
#7Hm... this seems like a very complicated way of saying that github should have a way to merge pull requests into a new branch. ...but it doesn't so you have to: - checkout a local copy - add a remote to the PR - checkout a new branch - merge the PR into your local branch - fix code, merge to master Which is entirely true; it is annoying. The simple solution, though, is to require pull requests to come in a feature br…
It's just: git fetch origin pull/ID/head:BRANCHNAME git checkout BRANCHNAME
Edit: I see that MaikuMori[2] posted the same information just before me; ah well.
[1]: https://help.github.com/articles/checking-out-pull-requests-...
Re: Merge Pull Request Considered Harmful
#8Just a note to people who want to try this: According to the post you should use the command "git am -3 ", this seems to be a typo and should be: "hub am -3 "
Re: Merge Pull Request Considered Harmful
#9Is this exactly situation that https://help.github.com/articles/checking-out-pull-requests-... documents? So basically: git fetch origin pull/ID/head:BRANCHNAME git checkout BRANCHNAME And now you can edit that pull request and/or make new pull request based on the previous one. Or just simply merge in master.
I don't know about you guys, but I have not found them useful? Do you use the merge commits for anything?
Re: Merge Pull Request Considered Harmful
#10I just tried this on an open pull request we had. Pretty ok experience. For some reason though, there where a merge conflict when running the "hub am -3 " command. In my case was easy to fix, but Github reported the PR to be mergeable, so maybe Github uses a different merge strategy for PR's than "hub am" out of the box?