Coding 101

How to Contribute to Open Source: Practical Git Workflows and Maintainer Etiquette

DD
Ankur Ishwar
9 min read Updated Sep 7, 2026
Dropout Developer • Editorial Coding 101

How to Contribute to Open Source: Practical Git Workflows and Maintainer Etiquette

Oct 16, 20239 min read

The Hacktoberfest Trap vs Real Engineering Contributions

Every October, thousands of college students in India get advised by influencers to submit pull requests changing spelling errors in markdown READMEs just to win a free t-shirt or digital sticker. Maintainers get swamped with hundreds of useless PRs, issue trackers get locked, and aspiring developers learn zero real engineering skills.

Open source is not about gaming GitHub contribution graphs with green squares. It is public, high-stakes collaborative software development. When you fix a real bug in an open source library, your code runs on production servers across thousands of companies. That public pull request is 10 times more convincing on your resume than any paid certification from an EdTech platform.

Here is the exact terminal workflow, debugging routine, and etiquette required to land merged pull requests in reputable open source repositories.

The Anatomy of a Production Pull Request Lifecycle

A maintainable contribution follows a strict git protocol:

  1. Fork: Create your own copy of the repository under your GitHub account.
  2. Clone and Configure Upstream: Link the original repository as an upstream remote to keep your local branch synced.
  3. Reproduce the Bug Locally: Never write a line of fix code until you write a failing test that reproduces the problem.
  4. Create a Focused Branch: Work on a single, isolated topic branch.
  5. Pass CI Validation: Run linters, formatters, and unit tests locally before pushing.
  6. Submit PR with Context: Explain the problem, the root cause, and the fix with clear issue links.

Step 1: Setting Up Upstream Remotes in Git

The most common beginner mistake is pushing directly to a clone without tracking the upstream source repository. Run these terminal commands in your local workspace:

# 1. Clone your personal fork
git clone https://github.com/YOUR_USERNAME/target-library.git
cd target-library

# 2. Add the original repository as 'upstream'
git remote add upstream https://github.com/ORIGINAL_OWNER/target-library.git

# 3. Verify your remotes
git remote -v
# origin    https://github.com/YOUR_USERNAME/target-library.git (fetch)
# origin    https://github.com/YOUR_USERNAME/target-library.git (push)
# upstream  https://github.com/ORIGINAL_OWNER/target-library.git (fetch)
# upstream  https://github.com/ORIGINAL_OWNER/target-library.git (push)

Before you ever start working on a new issue, pull the latest changes from upstream so your code stays completely up to date with the maintainer's codebase:

# Sync your local main with upstream main
git fetch upstream
git checkout main
git merge upstream/main

# Create an isolated feature branch
git checkout -b fix/date-parser-timezone-offset

Step 2: Writing a Reproduction Test Case

Suppose you find an issue in a TypeScript utility library where parsing UTC timestamps in Indian Standard Time (+05:30) returns an offset by one day. Do not jump straight to the source file to tweak regexes.

First, write a test case in the test suite that fails:

// test/date-formatter.test.ts
import { describe, it, expect } from 'vitest';
import { parseTimestampToIST } from '../src/date-formatter';

describe('parseTimestampToIST', () => {
  it('correctly shifts midnight UTC to 05:30 AM IST on the same calendar day', () => {
    const rawUtcString = '2026-03-01T00:00:00Z';
    const formatted = parseTimestampToIST(rawUtcString);

    // Expected output format: YYYY-MM-DD HH:mm
    expect(formatted).toBe('2026-03-01 05:30');
  });
});

Run your test runner: npm test. You will see a red failure. Now implement the minimal fix in the source code until the test turns green.

Step 3: Committing with Conventional Standards

Never write generic commit messages like "fixed bug" or "updated logic". Maintainers rely on automated changelog generators that parse Conventional Commits:

# Check modified files
git status

# Stage changes
git add src/date-formatter.ts test/date-formatter.test.ts

# Commit with standard prefix: type(scope): description
git commit -m "fix(formatter): resolve timezone offset rounding in parseTimestampToIST"

Step 4: Submitting the Pull Request

Push your feature branch to your personal fork:

git push -u origin fix/date-parser-timezone-offset

Go to the repository on GitHub and open the Pull Request. Provide a concise description that answers three questions:

### Description
This PR fixes timezone parsing when raw UTC timestamps fall on month boundaries in positive UTC offsets (+05:30 IST).

### Root Cause
The date parsing helper used `getDate()` instead of `getUTCDate()`, causing local browser runtime offsets to shift date strings prior to timezone conversion.

### Related Issue
Closes #412

### Verification
- Added unit test in `test/date-formatter.test.ts`
- Passed full test suite locally (`npm test`)
- Passed linter checks (`npm run lint`)

Maintainer Etiquette: How to Avoid Getting Blocked

Open source maintainers are usually senior engineers volunteering their personal evenings and weekends. Treat their time with absolute respect:

  • Do Not Ping Maintainers on LinkedIn or WhatsApp: Keep all discussions inside the GitHub issue or pull request comments. Messaging maintainers on personal social channels is intrusive and unprofessional.
  • Never Open PRs Without Claiming or Discussing: For major features or architectural refactors, always open an issue first to discuss the design. Maintainers will reject large unexpected pull requests that do not align with the project roadmap.
  • Accept Review Feedback Gracefully: If a maintainer requests code changes or asks you to rethink your approach, do not take it personally. Address their feedback with a new commit on your branch. Your PR will update automatically.

How to Find Beginner-Friendly Issues That Matter

Avoid searching for massive libraries like React or Kubernetes on day one. Instead, target:

  1. Libraries You Actually Use: If you built a project with a small utility library (e.g., an icon library, an API wrapper, or a validation helper) and noticed missing documentation or an unhandled edge case, that is your golden entry point.
  2. GitHub Search Filters: Search GitHub using queries like: is:open is:issue label:"good first issue" language:typescript no:assignee.
  3. Documentation Gaps: Clarifying ambiguous API parameters, updating broken demo code snippets, or writing real-world usage examples in the docs is always welcomed by project owners.

Conclusion

A single merged pull request in a respected open source repository proves you know Git branching, can read other engineers' codebases, and can operate under peer review. Start small, write tests, respect maintainers' guidelines, and let your public GitHub contributions open career doors for you.

Found this useful?
View all articles

Keep Reading

Related Articles

Learn with Dropout Developer

Build real software with AI

Step-by-step learning paths, vibe coding tutorials, and certified developer programs designed for the modern engineer.