AI Hints
Home›Git & GitHub Tutorial›Merging Pull Requests
Git & GitHub · Lesson 74 of 144

Issues

Tracking work on GitHub.

⏱ 2 min read▶ Video at 1:20:38🎓 Free
Watch this lesson in the Git & GitHub courseWatch on YouTube ↗Full Git & GitHub course

Every GitHub repository has an issues tab. An issue is a note about something to do. A bug to fix, a feature to add, or a question. It's a simple to-do list that the whole team shares.

Issues
From the video: Issues
  • Bugs, features, questions
  • A shared to-do list
  • Every repository has one

A good issue

A good issue has a clear title. A description, with steps to reproduce a bug, or the reason for a feature. Labels, like bug, or enhancement. And someone assigned to it, so everyone knows who's working on it. Each issue gets a number, like number twelve.

Titleshort and clear
Descriptionsteps or reasons
Labelsbug, enhancement
Number#12

Closing issues from commits

Here's a neat trick. If a commit or pull request says fixes, followed by the issue number, GitHub closes that issue automatically, once it reaches main. Here, our commit message says fixes number twelve.

git
echo 'img { max-width: 100%; }' >> style.css
git commit -am "Fix images overflowing on phones (fixes #12)"
[main 24d14c4] Fix images overflowing on phones (fixes #12)
 1 file changed, 1 insertion(+)
git log --oneline -n 1
24d14c4 (HEAD -> main) Fix images overflowing on phones (fixes #12)

Summary

Issues track work on GitHub. Write fixes, and the issue number, in a commit or pull request, to close it automatically. Next, contributing to projects you don't own.

Key takeaways
  • Issues = shared to-do list
  • Labels and assignees
  • 'fixes #12' closes it
Next up: Forks — your own copy of any project