Real-World GitHub Project Workflow

Now that you know the building blocks — commits, branches, pull requests, issues, and actions — it’s time to bring them together into a real-world GitHub project workflow.

This chapter will simulate how a team collaborates to build, track, test, and deploy a project using Git and GitHub.

Scenario:

You’re working with a team on a website project called MyPortfolio. Your role is to add a new “Contact” section.

Let’s walk through the typical GitHub workflow from start to finish.

Step 1: Clone the Repository

You begin by cloning the team repository to your local machine:

Bash
git clone https://github.com/team/myportfolio.git
cd myportfolio

Step 2: Create a Feature Branch

Branching keeps your work isolated and clean:

Bash
git checkout -b add-contact-section

This allows you to build the new section without affecting the main site.

Step 3: Make Code Changes

You add your HTML, CSS, or JS changes related to the contact form. Once done:

Bash
git add .
git commit -m "Add contact section with form and styles"

Step 4: Push the Feature Branch to GitHub

Bash
git push origin add-contact-section

This creates a remote branch on GitHub.

Step 5: Open a Pull Request (PR)

On GitHub:

  1. Go to the repo → Your new branch will appear
  2. Click “Compare & pull request”
  3. Add a title and a description of your changes
  4. Link related issues if applicable (e.g., “Fixes #7”)

Step 6: Team Review

Your teammates can:

  • View the code
  • Comment or request changes
  • Approve the pull request

Once approved, you or the maintainer will merge it into the main branch.

Step 7: GitHub Actions Runs Tests

If your project uses GitHub Actions, a test script will run automatically after the pull request is pushed or merged.

For example:

  • Linting JavaScript
  • Running unit tests
  • Deploying to GitHub Pages or Netlify

You’ll see status checks below the PR.

Step 8: Clean Up

After your PR is merged:

Bash
git checkout main
git pull origin main
git branch -d add-contact-section

Step 9: Track Progress Using Issues & Projects

  • Open an issue for each task or bug
  • Organize work using project boards
  • Use milestones to group issues for releases

Example Project Board Columns:

  • To Do
  • In Progress
  • Review
  • Done

Summary: GitHub Workflow Recap

StepAction
Clonegit clone
Branchgit checkout -b
CodeEdit + git add + git commit
Pushgit push origin [branch]
PRCreate Pull Request
ReviewTeam reviews + merges
ActionsTests and deploy
CleanDelete merged branch

This workflow is used by open-source projects, startups, and enterprises around the world — and now, you’re ready to follow it too.

📘 Next Topic

Troubleshooting Common Git Problems →