Answer a question

I try

git commit -m "example of coding - close #1 close #2" 
git push origin develop

but it only close #1 issue. How can I close two or more issues with commit message?

Answers

You can use any of these keywords to close an issue via commit message:

close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved

The message MUST contain a string matching the following pattern: KEYWORD #ISSUE. For example: close #1.

How can I close two or more issues with commit message?

You can use comma separated list in the commit message for it.

See this link for more information.

It is also possible to close several issues in the same commit: just repeat several time the pattern to close issues. For example, the following commit message: add new quick sort algorithm, fixes #4, resolve #6, closed #12 would close, the issues 4, 6 & 12 of the project on which the commit would occur.

You can try:

git commit -m "closes #1, closes #2, closes #3; YOUR COMMIT MESSAGE"

EDIT:

Adding a link from docs.github.com.

You can link a pull request to an issue by using a supported keyword in the pull request's description or in a commit message (please note that the pull request must be on the default branch).

close, closes, closed, fix, fixes, fixed, resolve, resolves resolved

enter image description here

Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐