Day 2 Source Control Lab Assignment
- Objective
Apply collaborative Git and GitHub skills from the Day 2
lab to work in pairs on a front-end project (HTML/CSS/JS),
managing branches, pull requests, conflicts, and comparing
merge and rebase workflows, while answering theoretical
questions about Git’s collaborative structure.
- Set Up a Shared Repository:
One student creates a new GitHub repository with an
HTML/CSS/JS project (e.g., a webpage with a
heading, styled section, and interactive button).
Invite your partner as a collaborator to work together.
- Create and Manage Feature Branches:
Each student creates a feature branch to add a new
webpage feature (e.g., one adds a CSS animation, the
other adds a JavaScript form).
Save and upload the changes to the respective
branches on GitHub.
- Submit and Review Pull Requests:
Each student submits a pull request for their feature
branch.
Review your partner’s pull request, provide feedback
(e.g., suggest a style tweak), and approve the merge
into the main branch.
- Resolve a Merge Conflict:
Both students modify the same part of a file (e.g., the
same CSS rule) in their feature branches to create a
conflict.
Resolve the conflict together, ensuring the webpage
functions correctly, and complete the merge.
- Compare Merge and Rebase:
Create a new feature branch with a small change
(e.g., update a heading).
Merge this branch into the main branch and observe
the project history.
Reset the merge, then rebase the same branch onto
the main branch and compare the history.
- Repeat The same steps with Vice versa for each one
- Part 2: Theoretical Questions
What is the purpose of a feature branch in GitHub
Flow, and how does it benefit front-end developers
working on a team project?
How does a pull request facilitate collaboration in a
front-end project, and what makes a good pull request
description?
- What causes a merge conflict in a Git repository, and
why might this be common in front-end projects
involving CSS or JavaScript files?
- What is the difference between merging and rebasing
in terms of project history?
- How does GitHub’s remote repository enhance team
collaboration compared to a local Git repository,
especially for front-end development?
Good Luck