Many times, as an open source project maintainer, I’m tasked with reviewing pull requests that community members have contributed to our project. It’s honestly one of my favorite things to do. Seeing community collaboration on projects is awesome, and really helps me feel a purpose to what I do on a day to day basis. While any pull request is typically welcome, there are times when slight edits are needed to meet project guidelines or coding standards.

Edit a pull request and maintain commit history

The worst thing I could do as a maintainer is reject someone’s code on they whitespace issues alone. I’d love to have the whitespace perfect, but as long as the code works and achieves the task in a manor I feel adequate, whitespace changes or docblocs should not matter.

The key here though, is I shouldn’t lose someone’s commit history, since they deserve credit for the initial work they’ve done. So here’s how I handle this.

First, if an issue doesn’t exist for the pull request I create one. That’s important later.

We’ll assume 2 things here in my code:
1) The Pull Request number is 123
2) The Issue number is 567

git fetch origin pull/123/head:pull/123
git checkout pull/123
git checkout -b issue/567 pull/123
// Make changes
git push origin issue/567

From that point you can close the original Pull Request in 123 without merging, and after making your edits and pushing to the issue/567 branch, create a new pull request. This new pull request, will have all the necessary commit history to retain credit for the original Pull Request author.

Posted by Chris Klosowski

Chris Klosowski is the Director of Technology at Sandhills Development, LLC, creators of fine WordPress plugins, and ecommerce solutions.

91 Comments

  1. Hello,

    It is with sad regret to inform you that BestLocalData.com is shutting down.

    We have made all our databases for sale for a once-off price.

    Visit our website to get the best bargain of your life. BestLocalData.com

    Regards,
    Isidra

    Reply

  2. This paragraph is genuinely a nice one it helps
    new internet people, who are wishing in favor of blogging.

    Reply

  3. It is with sad regret to inform you that because of the Covid pandemic BestLocalData.com is shutting down at the end of the month.

    We have lost family members and colleagues and have decided to shut down BestLocalData.com

    It was a pleasure serving you all these years. We have made all our databases available for $99 (All of it for $99) for those interested.

    Kind Regards,
    BestLocalData.com
    Mable

    Reply

  4. Hi ,

    I am following up on my message below.

    Who would I speak with about handling your US order fulfillment and shipping?

    Regards,
    Rene
    order-fulfillment.net

    ————————————————————————

    Hi,

    Who would I speak with at your company that manages your product shipping and order fulfillment?

    We are US company, offering warehousing, order fulfillment and drop shipping to our customers since 2005.

    Here are some of the items we ship for clients:

    -Books, training manuals, guides
    -E-com product drop shipping
    -New member welcomes boxes and gifts
    -Product samples
    -Health and Medical supplements
    -Marketing materials
    -Medical program test kits
    -Follow up gifts to clients, leads, and prospects

    Do you have some time to discuss – phone / email ?

    Thanks,

    Fulfillment Specialist
    http://www.Order-Fulfillment.net

    Reply

  5. When someone writes an paragraph he/she keeps the image of a user
    in his/her brain that how a user can be aware of it.
    Therefore that’s why this article is perfect.
    Thanks!

    Reply

  6. generic cialis soft tabs online – generic brand for cialis generic tadalafil safe

    Reply

  7. buy viagraa how long before viagra works sxvxxsj – viagra and alcohol

    Reply

  8. cheap chinese viagra paying with paypal viagra, dapoxetine ViagraCND100Mg – viagrasupplierscapetown

    Reply

  9. buy prednisone online canada buy prednisone – prednisone 10mg

    Reply

  10. zithromax capsules price buy zithromax – zithromax 250mg

    Reply

  11. 200 mg doxycycline cheap doxycycline – order doxycycline 100mg without prescription

    Reply

  12. buy ivermectin pills stromectol for sale – ivermectin australia

    Reply

  13. cost of stromectol medication best price on ivermectin pills – cost of ivermectin medicine

    Reply

  14. ivermectin usa stromectol ivermectin for humans – ivermectin 80 mg

    Reply

  15. cost of ivermectin buy stromectol online – stromectol 3 mg

    Reply

  16. pharmacy medications prescription drugs without doctor approval – compare ed drugs

    Reply

  17. dysfunction erectile prescription meds without the prescriptions – viagra without a doctor prescription

    Reply

  18. ed supplements prescription drugs without doctor approval – cheapest ed pills online

    Reply

  19. medicine for ed ed meds online without doctor prescription – drugs online

    Reply

  20. best ed pills non prescription viagra without doctor prescription amazon – hims ed pills

    Reply

  21. stromectol cvs buy stromectol – stromectol usa

    Reply

  22. ivermectin syrup ivermectin tablets for humans for sale – ivermectin 6mg

    Reply

  23. lipitor price drop buy lipitor – lipitor 20 mg pill

    Reply

  24. stromectol buy uk ivermectin – stromectol 3 mg dosage

    Reply

  25. stromectol medicine ivermectin 1 – ivermectin 3 mg

    Reply

  26. plaquenil discount buy plaquenil – plaquenil tablet canada

    Reply

  27. cialis with dapoxetine australia overnight delivery cialis pills – black cialis

    Reply

  28. Thank you, I have just been looking for info about this subject for a while and yours is the greatest I have found out till
    now. However, what about the bottom line? Are you positive in regards to the source?

    Reply

  29. buy viagra online canada viagra – cost of viagra

    Reply

  30. viagra discount buying viagra online – viagra without a doctor prescription usa

    Reply

  31. clomiphene generic clomid for sale – clomid capsules 50mg

    Reply

  32. treatment for erectile dysfunction buy prescription drugs from canada – ed medications comparison

    Reply

  33. ed pills for sale prescription drugs without doctor approval – ed meds online pharmacy

    Reply

  34. buy cialis black au cialis discounts – brand cialis on line

    Reply

  35. Wow, amazing weblog format! How long have you
    been blogging for? you made running a blog look
    easy. The overall glance of your web site is great, let alone the content!

    Reply

  36. ed treatment drugs buy prescription drugs from canada – ed treatments that really work

    Reply

  37. Tricks To Last Longer

    Reply

  38. ivermectin 1 ivermectin tablets – purchase oral ivermectin

    Reply

  39. You’ve made some good points there. I looked on the internet for more information about the issue and found most people will go along with your views on this site.

    Reply

  40. purchase finasteride without a prescription propecia – propecia buy without per

    Reply

  41. propecia without a doctor prescription buy propecia – finasteride medication

    Reply

  42. I’m extremely inspired with your writing abilities as smartly as
    with the layout on your weblog. Is that this a paid topic or did you modify it your self?
    Either way keep up the nice quality writing, it is uncommon to look
    a nice weblog like this one today..

    Reply

  43. where can i buy propecia buy propecia – generic propecia canada

    Reply

  44. ivermectin generic cream ivermectin for humans – buy stromectol uk

    Reply

  45. ivermectin 4000 mcg ivermectin for humans where to buy – stromectol cvs

    Reply

  46. Thanks to my father who stated to me about this weblog, this web site is really awesome.

    Reply

  47. order zithromax without prescription zithromax generic – where can i buy zithromax medicine

    Reply

  48. stromectol drug ivermectin lotion for lice – ivermectin 12 mg

    Reply

  49. purchase prednisone canada prednisone generic – prednisone 30 mg coupon

    Reply

  50. It’s awesome for me to have a web page, which is beneficial in support of my know-how.

    thanks admin

    Reply

  51. where can i buy viagra over the counter best place to buy generic viagra online – online doctor prescription for viagra

    Reply

  52. cialis 80mg cialis online no prescription australia – canada cialis with dapoxetine

    Reply

  53. foods for ed indian pharmacies without an rx – amoxicillin without a doctor’s prescription

    Reply

  54. buy generic 100mg viagra online buying viagra online – п»їviagra pills

    Reply

  55. cvs prescription prices without insurance overseas pharmacies shipping to usa – what causes ed

    Reply

  56. cialis without a script cialis no prescription canada – generic cialis uk

    Reply

  57. google viagra dosage recommendations cheap generic drugs from india – cheap pet meds without vet prescription

    Reply

  58. I’m really enjoying the theme/design of your weblog. Do you ever run into any browser compatibility issues?
    A handful of my blog readers have complained about my blog not operating correctly in Explorer but looks great in Opera.
    Do you have any ideas to help fix this issue?

    quest bars http://j.mp/3C2tkMR quest bars

    Reply

  59. new erectile dysfunction treatment recommended canadian online pharmacies – errectile dysfunction

    Reply

  60. generic cialisw cialis no prescription canada – cialis vs viagra vs kamagra

    Reply

  61. WOW just what I was looking for. Came here by searching for evergreen asmr https://app.gumroad.com/asmr2021/p/best-asmr-online asmr

    Reply

  62. ivermectin 2% ivermectin – ivermectin 2%

    Reply

  63. Your style is so unique compared to other people I have read stuff from.
    I appreciate you for posting when you’ve got the opportunity,
    Guess I’ll just book mark this page. scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis
    surgery

    Reply

  64. ivermectin cost buy ivermectin – ivermectin 8 mg

    Reply

  65. Hello, I wish for to subscribe for this blog to take latest
    updates, thus where can i do it please assist. scoliosis surgery
    https://0401mm.tumblr.com/ scoliosis surgery

    Reply

  66. Heya i am for the first time here. I came across this board and I find It
    really useful & it helped me out much. I hope to give something back and aid others like you helped me.
    cheap flights http://1704milesapart.tumblr.com/ cheap flights

    Reply

  67. ivermectin price canada generic ivermectin cream – buy ivermectin pills

    Reply

  68. Ridiculous quest there. What occurred after?

    Thanks! ps4 https://bit.ly/3z5HwTp ps4

    Reply

  69. Today, I went to the beach with my kids. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put
    the shell to her ear and screamed. There was a hermit crab
    inside and it pinched her ear. She never wants to go back!
    LoL I know this is totally off topic but I had
    to tell someone! quest bars https://www.iherb.com/search?kw=quest%20bars quest
    bars

    Reply

Leave a reply

Your email address will not be published. Required fields are marked *