

Ask HN: Etiquette around altering commits in pull requests on GitHub - sbank

Say you own a project and have some idea of how you want code and commits to be structured. In comes a pull request that doesn&#x27;t live up to that. No problem. Sometimes you can ask them to correct a few things and merge away, but at other times there will be too many things and, well, you don&#x27;t want to come off as a person that is hard to deal with.<p>What do you consider appropriate etiquette regarding changing their code and&#x2F;or commit messages and doing a manual merge where you pull down their branch and go to town? How this is usually done is that they will be the author of the commit and you will be the committer (Git feature), but a lot of the code might be yours, and the commit message might be yours as well. Basically, you are changing their code and wording, but they retain the main credit for the work and you stand merely as the committer of the code.<p>I have seen this happen on a several popular projects, and I can understand why. My question is: Is the author&#x2F;committer feature of Git enough to indicate that the person might not have written all the code or even written the commit message? What I fear is that the code, or even the commit message, ends up being something that they would not want out there under their name when all is said and done, and that this way of managing a project will scare people away.<p>So I&#x27;m curious about people&#x27;s take on this, because I&#x27;ve seen it happen on several projects, and there&#x27;s even been blog posts here on HN about this practice.
======
ArtDev
If it was a small fix, I couldn't care less if I don't get credit for my
contribution.

However, if its a significant amount of code, it would be considerate that the
project maintainer to merge the changes first, then modify in a subsequent
commit. That my two cents.

~~~
sbank
I lean towards merging as is and fixing afterwards. Or doing a manual merge
locally, fix whatever needs to be fixed, and then push to master. There is
just something about changing other people's commits that doesn't sit well
with me. But maybe there is something about the author/committer feature of
Git and how it's intended to be used that I'm not understanding.

------
J_Darnley
If a patch is incorrect, why are you applying it? What makes a github feature
different to this? If a patch is incorrect you get the other person to do it
over.

