GitHub Issues
GitHub Issues are used to track bugs, feature requests, and tasks for a repository. Each issue has a title, description, labels, assignees, and a discussion thread.
Issues can be linked to pull requests and commits, so closing a pull request can automatically close the related issue, keeping project tracking organized.
git commit -m "Fix login bug, Fixes #42"Creating and managing issues
Click 'New issue' on a GitHub repo, give it a clear title and description, and optionally add labels (like 'bug' or 'enhancement') and assign it to a team member.
Linking issues to commits and PRs
Reference an issue number like #42 in a commit message or pull request description. Using keywords like 'Fixes #42' automatically closes the issue when the PR merges.
git commit -m "Fix null pointer on empty cart, fixes #17"[main 5a1c9de] Fix null pointer on empty cart, fixes #17References issue #17 in the commit message so GitHub can link the fix to the issue.
git push origin mainTo github.com:user/repo.git
7f3c2ee..5a1c9de main -> mainPushing this commit (once merged via PR) will automatically close issue #17 on GitHub.
Key points
- Issues track bugs, features, and tasks in a repository.
- Issues support labels, assignees, and discussion threads.
- Referencing 'Fixes #number' links commits/PRs to issues.
- Merging a linked PR can automatically close the related issue.
