Students must:
- Fork the provided example repository.
- Clone their fork locally.
- Add the original repository as
upstream.
git clone <your-fork-url>
cd <repository-name>
git remote add upstream <original-repo-url>The repository contains:
mainbranch → stable reference branch (do not modify directly unless instructed)devbranch → integration branch for development- Source files for modification and feature implementation
All development work must occur in feature branches created from dev.
Students will practice the following Git operations on their fork:
- Edit an existing file or add a new file.
- Stage changes.
- Commit with a meaningful message.
- Push to GitHub.
git status
git add .
git commit -m "Describe your change clearly"
git push origin <branch-name>If updates are made to dev:
git checkout dev
git pull origin devStudents must ensure their local branch stays up to date.
- Create a feature branch from
dev. - Make changes.
- Commit changes.
- Merge back into
dev.
git checkout dev
git checkout -b feature/<name>
# make changes
git add .
git commit -m "Implement feature"
git checkout dev
git merge feature/<name>Students must:
-
Create a new branch following naming convention:
feature/<short-feature-name> -
Implement a small feature or enhancement.
-
Make at least three meaningful commits, for example:
- Initial implementation
- Improvement or refactor
- Documentation or cleanup
-
Merge the completed feature branch into
dev. -
Push all branches to GitHub.
Commit messages must:
- Be concise and descriptive
- Explain what changed, not just that something changed
Good example:
Add input validation to user form
Bad example:
update
- Do not commit directly to
main - Do not delete existing core files
- Do not squash commits (commit history should remain visible)
- Do not force push
A GitHub repository containing:
- Proper branch structure
- Clear commit history
- A merged feature branch into
dev