New! Explore our Programming Academy and AI Tutor - learn to code from scratch, free to start. Explore Now
Programming› Git› Project: A Team Workflow

Project: A Team Workflow

💻 Git

Run a full feature workflow from issue to merge with a clean history.

Lesson 9 of 9 Project
0 of 9 completed

This project practises the loop professional teams use every day: branch, commit, push, review and merge.

By the end of this lesson you can:
  • Plan a small change.
  • Work on a feature branch.
  • Open a pull request and merge it.

Step 1: Start Clean

Pull the latest main, create a branch and confirm you are on it.

git switch main
git pull
git switch -c feature/contact-page

Step 2: Commit in Steps

Make the change in small commits. Add the page, then the styles, then the link. Each commit should leave the project working.

Step 3: Push and Review

Push the branch, open a pull request, and include a summary and manual test notes. Fix review comments with follow-up commits rather than rewriting shared history.

Step 4: Merge and Clean Up

Once approved, merge on the remote, pull main locally and delete the branch. Confirm the deployed site shows the change.

Tip A pull request that changes one thing is reviewed faster and breaks less often than a large one.

Practice

  1. Write a pull request description for a small feature.
  2. Rebase your branch on main before opening the pull request.
  3. Delete the local and remote branch after merging.

Hands-on exercise

Run the full workflow in a test repository:
1. Branch from main.
2. Make two focused commits.
3. Push the branch.
4. Merge it back into main.
5. Delete the branch locally and on the remote.
6. Show the final graph.

Recap

A reliable workflow is branch, commit in small steps, push, review, merge and clean up.

Example

git switch main
git pull
git switch -c feature/contact-page

Exercises

Exercise 1. Complete the loop Medium
Run the full workflow in a test repository:
1. Branch from main.
2. Make two focused commits.
3. Push the branch.
4. Merge it back into main.
5. Delete the branch locally and on the remote.
6. Show the final graph.
Git exercise-1.txt
Expected Output
A clean feature history that has been merged and cleaned up.

Lesson Nav

Lesson sections