7

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?

asked Feb 1, 2012 at 16:54

1 Answer 1

7

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

answered Feb 1, 2012 at 17:30
1
  • +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). Commented Feb 1, 2012 at 20:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.