Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to close issues in Github via my commit messages, but I'm not sure which commit should contain the magic "Closes #XXX" string when multiple commits are responsible for closing the issue. Specifically, I'm wondering if the last commit on my feature branch (always merged with --no-ff) should close the issue, or if I should close it via the merge commit that sort of "summarizes" the entire feature branch? Is there a standard way of doing this, something endorsed by the Git community?

share|improve this question
add comment

1 Answer

I generally vote for "the commit that merges the fix branch into the main line of development". Related commits should reference the issue.

share|improve this answer
    
+1. You only know if the issue can really be closed once you've tested it, and for pretty much all sane workflows I've seen so far, this means the code has to be committed already (running decisive tests on uncommitted code is madness). –  tdammers Feb 1 '12 at 20:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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