-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a TIL on something I thought I had done a
long time ago. But I could not find it when I needed it. So this time around it got a write up
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
github/work_on_issues_from_comments_and_commit_messages.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Work on issues from comments and commit messages | ||
|
||
You can then specify one of the following strings, followed by a issue number, to work on an issue from a commit message or comment: | ||
|
||
- `close` | ||
- `closes` | ||
- `closed` | ||
- `fixes` | ||
- `fixed` | ||
|
||
Example: | ||
|
||
```bash | ||
git commit -m "Closes #34" | ||
``` | ||
|
||
The string is case-insensitive and can be followed by a colon or not I believe (have not thoroughly tested this). | ||
|
||
And most importantly only works on your primary branch whether you call in `main`, `master`, or something else. So for a commit, the closing of the issue will not happen until the commit is merged into the primary branch. | ||
|
||
## Resources and References | ||
|
||
- [GitHub Blog](https://github.blog/2013-01-22-closing-issues-via-commit-messages/) |