Skip to content

Commit

Permalink
Added a TIL on something I thought I had done a
Browse files Browse the repository at this point in the history
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
jonasbn committed Jul 13, 2024
1 parent 55a605d commit e06c44a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions github/work_on_issues_from_comments_and_commit_messages.md
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/)

0 comments on commit e06c44a

Please sign in to comment.