What Is an Issue in Git?

What Is an Issue in Git?

A complete, beginner-friendly walkthrough of "issues" — a project-tracking feature built by hosting platforms like GitHub and GitLab on top of Git, not a feature of Git itself — and how real engineering teams use them to plan, discuss, and ship work.

Open almost any repository on GitHub or GitLab and you’ll find a tab labeled “Issues” sitting right next to “Code.” It’s easy to assume this is a Git feature, tightly woven into version control itself — but it isn’t. An issue is a tracked discussion item created and stored entirely by the hosting platform, completely separate from Git’s commit history. This guide explains exactly what an issue is, why platforms built this feature on top of Git rather than inside it, and how professional teams use issues to turn scattered ideas and bug reports into organized, trackable work.

1Core Concept: What Is an Issue?

An issue is a trackable unit of work or discussion — typically a bug report, a feature request, a question, or a task — created inside a repository on a hosting platform such as GitHub, GitLab, or Bitbucket. It has a title, a description, a status (open or closed), and a running comment thread where people discuss it over time. Critically, an issue is not stored inside Git’s own data structures at all; it lives in the hosting platform’s separate database.

Everyday Analogy

Think of a Git repository as a workshop full of finished and in-progress furniture. Git itself is the workshop’s inventory ledger — a precise record of every piece ever built and every change made to it. An issue is like a sticky note pinned to the corkboard on the workshop wall: “the third chair’s leg is wobbly,” or “we should build a matching bookshelf next.” The sticky note isn’t part of any piece of furniture — it’s a conversation about what needs attention, sitting alongside the workshop rather than inside it.

Picture a concrete example: a user of a mobile app notices that the login screen crashes on older phones. They open the app’s GitHub repository and click “New Issue,” writing a title like “App crashes on login for Android 9 devices” along with steps to reproduce it. A maintainer replies asking for a screen recording. Another contributor comments that they can reproduce it and offers a possible fix. Eventually, someone submits a pull request that resolves the bug and references the issue, which then automatically closes. None of this — the title, the comments, the open/closed status — is stored as a Git commit or object; it all lives in the platform’s issue-tracking system.

i
Why It Exists

Git is deliberately narrow in scope — it manages file history and nothing else. But real software projects need to track bugs, plan features, and hold discussions long before any code is written. Rather than bloating Git itself, hosting platforms built issue tracking as a separate layer, keeping Git focused on code while still giving teams a connected place to plan and discuss.

Not

A Git Object

Issues have no equivalent to a commit, blob, or tree. They are rows in the hosting platform’s own database, not part of the repository’s Git history.

Not

Portable via git clone

Cloning a repository copies its entire commit history, but never copies its issues — they stay behind on the platform.

Is

A Discussion & Tracking Unit

It combines a description, a status, labels, assignees, and a comment thread into one trackable, linkable item.

Is

Linkable to Code

Commits and pull requests can reference an issue by number, and certain keywords can automatically close it once merged.

2How Issues Work Internally

Because issues live entirely on the hosting platform’s side, the mechanism resembles a typical web application’s data model far more than anything inside Git. Here’s what actually happens when an issue is created and later referenced from code.

1

A Record Is Created

The platform’s database stores a new row: a unique issue number, title, description, author, timestamp, and an initial status of “open,” all tied to the repository’s ID.

2

Comments Are Appended

Every reply is stored as a separate, timestamped comment record linked to the issue, building a chronological conversation thread over time.

3

Code References Are Scanned

When a commit message or pull request description mentions the issue number (like #42) or a closing keyword (like “Fixes #42”), the platform detects the text pattern and creates a cross-link.

4

Status Updates on Merge

If a pull request containing a closing keyword is merged, the platform automatically flips the linked issue’s status from “open” to “closed” — a convenience feature layered entirely outside Git’s own merge mechanics.

!
A Subtle but Important Detail

Because issue data isn’t part of Git, it doesn’t migrate automatically if you move a repository from one hosting platform to another (say, GitHub to GitLab). Teams doing such migrations typically need a separate export/import step just for issues, comments, and labels.

3Data Flow & Lifecycle

flowchart LR
    A["Issue opened\n(bug, feature, question)"] --> B["Open status"]
    B --> C["Discussion via\ncomments"]
    C --> D["Contributor writes\ncode fix"]
    D --> E["Pull request opened\nwith 'Fixes #N'"]
    E --> F{"PR merged?"}
    F -->|"Yes"| G["Issue auto-closed"]
    F -->|"No / rejected"| C
    B -->|"No fix needed"| H["Manually closed"]
    

Fig 1 — The typical lifecycle of an issue, from creation to automatic closure

Notice that closing an issue can happen two ways: automatically, when a linked pull request with a closing keyword gets merged, or manually, when a maintainer decides the issue doesn’t need code changes — perhaps it was a duplicate, a misunderstanding, or something intentionally left as-is. Both paths end the same way (status becomes “closed”), but only the automatic path creates a permanent, visible link between the issue and the exact commit that resolved it.

4Anatomy of an Issue

Advanced Concepts

A well-formed issue is made up of several distinct parts, each serving a specific organizational purpose. Understanding them helps you both write better issues and navigate a busy repository’s issue tracker efficiently.

PartPurposeExample
Title & DescriptionStates the problem or request clearly“App crashes on login for Android 9 devices”
LabelsCategorizes the issue for filteringbug, enhancement, good first issue
AssigneesNames who is responsible for resolving itA specific maintainer or contributor
MilestoneGroups issues toward a shared release target“v2.0 Release”
Linked Pull RequestsConnects the discussion to the actual code fix“Fixes #42” inside a PR description
Comment ThreadRecords the ongoing discussion and decisionsBack-and-forth replies between contributors
?
What an Interviewer May Ask

“How would you keep a large open-source project’s issue tracker from becoming unmanageable?” — The expected answer: consistent labeling, a clear issue template requiring reproduction steps, regular triage to close stale or duplicate issues, and using milestones to group related work toward specific releases.

5Advantages, Disadvantages & Trade-offs

Advantages

  • Gives every bug report and feature idea a permanent, searchable, linkable home
  • Connects planning and discussion directly to the code that eventually resolves it
  • Free-form enough to handle bugs, questions, tasks, and long-term proposals alike
  • Public issue trackers let entire communities collaborate on triage and fixes

Limitations

  • Not portable — moving repositories between platforms usually leaves issue history behind unless separately exported
  • Can become overwhelming without active labeling, triage, and periodic cleanup
  • Lacks the structured fields of dedicated project-management tools (story points, sprints, burndown charts)
  • Large teams often outgrow basic issues and need supplementary boards or linked project-tracking tools

6Best Practices

1 Issue
= one clear problem
or request, not many
Fixes #N
link every PR to its
originating issue
Weekly
triage new and
stale issues regularly
  • Write a clear, specific title. “Button doesn’t work” helps no one; “Submit button on checkout page doesn’t respond on Safari 17” gets fixed faster.
  • Use an issue template for bug reports. Requiring reproduction steps, expected vs. actual behavior, and environment details drastically cuts back-and-forth clarification.
  • Keep one issue per problem. Bundling five unrelated bugs into a single issue makes it nearly impossible to close cleanly or track progress accurately.
  • Always link the fixing pull request. Using closing keywords like “Fixes #42” keeps the connection between discussion and code fully automatic and auditable.
  • Triage regularly. Close duplicates, label new issues promptly, and periodically review old ones that may no longer be relevant — an untriaged tracker quickly becomes unusable.

7Common Mistakes & Gotchas

GOTCHA-01 Common
Mistake

Assuming issues are part of the Git repository’s history and will transfer automatically when cloning or migrating.

Reality

Issues live in the hosting platform’s own database, entirely outside Git. Cloning a repository never brings its issues along, and migrating platforms requires a dedicated export/import process.

GOTCHA-02 Common
Mistake

Forgetting to use a closing keyword in a pull request, leaving the related issue open even after the fix is merged.

Reality

Without phrases like “Fixes #42” or “Closes #42” in the PR description, the platform has no way to know the two are connected, and someone has to close the issue manually — which is easy to forget.

GOTCHA-03 Common
Mistake

Letting issues pile up unlabeled and untriaged, turning the tracker into an unmanageable backlog.

Reality

Without regular triage, genuinely important bugs get buried under duplicates and stale requests, and new contributors have no reliable way to find approachable work.

8Real-World Usage Patterns

Open Source Projects

Community Bug Tracking

Large projects like VS Code use issues as their primary public bug tracker, with thousands of community-reported issues triaged, labeled, and prioritized by a core team.

“Good First Issue”

Onboarding New Contributors

Many projects label simple, well-scoped issues as “good first issue” specifically to give newcomers an approachable, guided entry point into contributing code.

Security Disclosures

Private Issue Handling

Platforms offer private or restricted issue types for security vulnerabilities, so sensitive bug reports aren’t publicly visible before a fix is ready.

Internal Engineering Teams

Lightweight Task Tracking

Smaller teams often use issues directly as their task tracker for day-to-day work, avoiding the overhead of a separate project-management tool entirely.

“An issue doesn’t fix anything by itself — it’s the conversation that makes sure the right fix eventually happens.”

9Frequently Asked Questions

Q1Is an issue a Git feature or a hosting platform feature?
It’s a hosting platform feature. The core git command-line tool has no concept of issues at all — they exist only inside platforms like GitHub, GitLab, and Bitbucket, built on top of the repositories they host.
Q2Do issues get included when I clone a repository?
No. Cloning copies the full Git commit history, but issues, comments, and labels stay on the hosting platform’s servers and are never part of the cloned data.
Q3How does an issue get automatically closed?
When a pull request description includes a closing keyword like “Fixes #42” or “Closes #42” and that pull request is merged, the platform automatically changes the linked issue’s status from open to closed.
Q4Can an issue exist without any code changes at all?
Yes. Many issues are questions, discussions, or feature proposals that get resolved through conversation alone and are closed manually, with no linked pull request ever created.
Q5What’s the difference between an issue and a pull request?
An issue tracks a problem, question, or request — it’s discussion-focused. A pull request proposes an actual code change to resolve something, often referencing the issue it fixes. Issues can exist without pull requests, but pull requests are usually linked back to one.

10Summary and Key Takeaways

Key Takeaways

  • An issue is a trackable discussion item — a bug report, feature request, or question — created and stored by the hosting platform, not by Git itself.
  • It lives in the platform’s own database as a title, description, status, labels, and comment thread, completely separate from Git’s commit history.
  • Issues can be linked to pull requests through closing keywords like “Fixes #42,” automatically transitioning from open to closed once the fix is merged.
  • Because issue data isn’t part of Git, it doesn’t transfer with git clone and requires a separate export/import step when migrating between hosting platforms.
  • Good issue hygiene — clear titles, consistent labels, linked pull requests, and regular triage — is what keeps a growing tracker useful rather than overwhelming.
  • Issues and pull requests serve complementary roles: one tracks the problem and discussion, the other delivers the actual code fix.
  • From solo maintainers to massive open-source communities, issues are the connective layer that turns raw ideas and bug reports into organized, shippable work.