Complete step-by-step instructions for team members to contribute to the GitHub collaboration project
- Team Overview
- Getting Started
- Branch Assignment
- Development Workflow
- Pull Request Process
- Individual Task Details
- Final Synchronization
- Tips & Best Practices
| 👤 Member | 🎯 Role | 🌿 Branch | 📁 Primary File |
|---|---|---|---|
| Repository Owner | Repository Owner & Reviewer | main |
All files (review & merge) |
| Developer 1 | Frontend Developer | feature/navbar |
index.html |
| Developer 2 | UI/UX Designer | feature/styling |
style.css |
| Developer 3 | JavaScript Developer | feature/js-interaction |
script.js |
Learn GitHub collaboration by building a simple website where each team member contributes a specific feature through separate branches and Pull Requests.
# Clone the repository to your local machine
git clone https://github.com/[repository-owner]/collab-practice.git
# Navigate to the project directory
cd collab-practice
# Verify you're on the main branch
git branch# Check current status
git status
# View existing files
ls
# You should see: index.html, style.css, script.js, README.md, OWNER_GUIDE.md, TEAMMATES_GUIDE.md
# Check remote connection
git remote -v- Branch Name:
feature/navbar - Primary File:
index.html - Task: Create and enhance navigation structure
- Branch Name:
feature/styling - Primary File:
style.css - Task: Design visual layout and responsiveness
- Branch Name:
feature/js-interaction - Primary File:
script.js - Task: Add interactive functionality
# Create and switch to your assigned branch
# For Developer 1:
git checkout -b feature/navbar
# For Developer 2:
git checkout -b feature/styling
# For Developer 3:
git checkout -b feature/js-interaction
# Verify you're on the correct branch
git branch
# The current branch will have an asterisk (*)- Open your assigned file in your preferred code editor
- Implement the features according to your task details (see section below)
- Save your changes frequently
- Test your changes by opening
index.htmlin a browser
# Check what files have been modified
git status
# Add your changes to staging
git add [your-filename]
# Example: git add index.html
# Commit with a descriptive message
git commit -m "Add [feature description]"
# Example: git commit -m "Add navigation bar with home, about, contact links"# Push your branch to GitHub
git push origin [your-branch-name]
# Example: git push origin feature/navbar
# If this is your first push, you might see a message about setting upstream
# Follow the suggested command if prompted🎥 Need Help? If you're confused about creating Pull Requests, watch this video tutorial: Creating a Simple Github Pull Request (Start from 3:21)
After committing your changes locally, push them to a new or existing branch on GitHub. Once pushed, GitHub will show a notification banner like this:
T� Branch Push Notification

This banner appears at the top of the repository page, indicating that your branch (e.g., update-name) has recent changes.
It includes a green "Compare & pull request" button.*Branch Push Notification**
Click the green button shown in the banner to begin the pull request process. This will take you to the PR creation page.
On the PR creation page:
- Add a title that summarizes your changes.
- Write a description explaining what the changes do and why they're needed.
- Optionally, attach files or images to support your explanation.
Create Pull Request Interface

This image shows the PR form with the green "Create pull request" button at the bottom.
You'll also see a reminder to follow GitHub's Community Guidelines and a summary of commits and file changes.
Once everything looks good, click the green button to submit your PR. Your changes are now ready for review by collaborators or maintainers.
After submission:
- Collaborators can comment, suggest changes, or approve the PR.
- Once approved, the PR can be merged into the main branch.
Create a navigation menu that allows users to navigate the website.
<!-- Add this navigation section after the <body> tag and before the <h1> -->
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>git add index.html
git commit -m "Add navigation bar with main menu items"
git push origin feature/navbar- Title:
Feature: Add navigation bar with main menu - Description: Added navigation menu with Home, About, Services, and Contact links
Style the website to make it visually appealing and responsive.
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Arial", sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
/* Navigation styles */
nav {
background-color: rgba(255, 255, 255, 0.95);
padding: 1rem 0;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 100;
}
nav ul {
list-style: none;
display: flex;
gap: 2rem;
justify-content: center;
margin: 0;
padding: 0;
}
nav a {
text-decoration: none;
color: #333;
font-weight: 500;
transition: color 0.3s ease;
}
nav a:hover {
color: #667eea;
}
/* Main content styles */
h1 {
color: white;
font-size: 3rem;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
text-align: center;
padding: 2rem;
}
/* Responsive design */
@media (max-width: 768px) {
nav ul {
flex-direction: column;
gap: 1rem;
}
h1 {
font-size: 2rem;
}
}git add style.css
git commit -m "Add comprehensive styling with responsive design"
git push origin feature/styling- Title:
Feature: Add responsive styling and modern design - Description: Added modern styling with gradient background, navigation styling, and responsive design
Add interactive functionality to enhance user experience.
// Wait for DOM to be fully loaded
document.addEventListener("DOMContentLoaded", function () {
console.log("🚀 GitHub Collaboration Practice - JavaScript Loaded!");
// Initialize interactive features
initializeClickHandlers();
initializeNavigation();
});
// Function to handle click interactions
function initializeClickHandlers() {
const heading = document.querySelector("h1");
if (heading) {
heading.addEventListener("click", function () {
// Change text content on click
if (this.textContent.includes("Welcome")) {
this.textContent = "🎉 Great job on the collaboration! 🎉";
this.style.color = "#FFD700";
} else {
this.textContent = "Welcome to Our Collaboration Project 🚀";
this.style.color = "white";
}
});
// Add hover effect
heading.addEventListener("mouseenter", function () {
this.style.transform = "scale(1.05)";
this.style.transition = "transform 0.3s ease";
});
heading.addEventListener("mouseleave", function () {
this.style.transform = "scale(1)";
});
}
}
// Function to handle navigation interactions
function initializeNavigation() {
const navLinks = document.querySelectorAll("nav a");
navLinks.forEach((link) => {
link.addEventListener("click", function (e) {
e.preventDefault();
const target = this.getAttribute("href").substring(1);
console.log(`Navigation clicked: ${target}`);
// Simple alert for demonstration
alert(
`You clicked on ${
target.charAt(0).toUpperCase() + target.slice(1)
} section!`
);
// Add active state
navLinks.forEach((l) => l.classList.remove("active"));
this.classList.add("active");
});
});
}
// Welcome message
console.log(`
🎉 Welcome to our GitHub Collaboration Practice!
Team Members:
👑 Repository Owner - Repository Owner
🔶 Developer 1 - Navigation Developer
🔷 Developer 2 - UI/UX Designer
🔸 Developer 3 - JavaScript Developer
Each member contributed through separate branches and Pull Requests!
`);git add script.js
git commit -m "Add interactive JavaScript functionality and animations"
git push origin feature/js-interaction- Title:
Feature: Add interactive JavaScript functionality - Description: Added click handlers, navigation interactions, entrance animations, and console logging
Once the repository owner has reviewed and merged all Pull Requests:
# Switch back to main branch
git checkout main
# Pull the latest changes from remote
git pull origin main
# Verify all changes are integrated
git log --oneline -5
#### **Test the Complete Application:**
1. **Open `index.html`** in your web browser
2. **Verify all features work together:**
- Navigation is visible and styled
- Styling looks good
- JavaScript interactions work
3. **Check browser console** for any errors
4. **Test responsive design** by resizing browser window
- ✅ Test frequently - Open
index.htmlin browser after each change - ✅ Small commits - Make frequent, small commits with clear messages
- ✅ Follow naming conventions - Use descriptive branch and commit names
- ✅ Stay focused - Only modify your assigned files
- ✅ Ask questions - Don't hesitate to ask if you're unsure
- ✅ Commit message format:
Add [what you added]orFix [what you fixed] - ✅ Pull before push - Always pull latest changes before pushing
- ✅ One feature per branch - Keep branches focused on single features
- ✅ Descriptive PR titles - Make it clear what your PR accomplishes
- ✅ Clean code - Ensure your code is readable and well-formatted
- ✅ Communicate early - Let others know if you encounter issues
- ✅ Respect others' work - Don't modify files assigned to teammates
- ✅ Be patient - Wait for proper review before expecting merges
- ✅ Learn from reviews - Use feedback to improve your skills
- ✅ Celebrate success - Acknowledge team achievements
- ❌ Don't work directly on main branch
- ❌ Don't force push (
git push -f) unless absolutely necessary - ❌ Don't ignore merge conflicts - Ask for help if you encounter them
- ❌ Don't rush - Take time to test your changes
- ❌ Don't modify other people's files without coordination
- Git Issues: Git Documentation
- GitHub Help: GitHub Docs
- HTML/CSS/JS: MDN Web Docs
- Check this guide first for common solutions
- Search online for specific error messages
- Ask team members in your communication channel
- Contact repository owner for guidance
- Create an issue in the repository if needed
By completing this collaboration exercise, you've learned:
- ✅ Git branching workflow - Creating and managing feature branches
- ✅ Pull Request process - Submitting code for review
- ✅ Code review culture - Understanding collaborative development
- ✅ Team coordination - Working with multiple developers
- ✅ GitHub features - Using professional development tools
These skills are essential for real-world software development!
Last updated: October 2025 | Repository: collab-practice | Team Guide v2.0