Closing multiple issues in Github with a commit message

Rayne picture Rayne · Aug 23, 2010 · Viewed 24.5k times · Source

I know you can close issues by putting closes #1 or fixes #1 in the commit message. What is the best way to close multiple issues in the same commit message?

Also, it appears that using fixes rather than closes doesn't create a link from the commit message to the issue, but it does close the issue. What's up with that?

Answer

Jakob Borg picture Jakob Borg · Aug 23, 2010

Closes #1, closes #2, closes #3; rest of commit message.

The closes clauses can be anywhere in the message and fixes is a valid synonym:

This fixes a memory leak in foo() that closes #4,
also fixes #5 which is a duplicate.

The following used to work, but nowadays only references issues #2 and #3.

Closes #1, #2, #3