Welcome contributors! 👋
This guide will help you understand the complete Git workflow used in this project.
If you're making your first contribution, follow the steps carefully.
Forking creates a copy of the repository under your GitHub account.
- Open the original repository.
- Click the Fork button on the top-right corner.
- GitHub will create a copy in your account.
Tip
Always fork the repository before making changes.
Clone your forked repository to your local machine.
git clone https://github.com/your-username/repository-name.gitMove into the project directory:
cd repository-nameThe upstream remote connects your local repository to the original project repository.
git remote add upstream https://github.com/original-owner/repository-name.gitVerify remotes:
git remote -vYou should see:
origin→ your forkupstream→ original repository
Important
Upstream helps you keep your fork updated with the latest project changes.
Before starting new work, pull the latest updates from the original repository.
git pull upstream masterIf the project uses main instead of master:
git pull upstream mainNever work directly on the main or master branch.
Create a separate branch for every issue or feature.
git checkout -b feature/your-feature-nameExample:
git checkout -b feature/navbar-fixFor bug fixes:
git checkout -b bug/login-error-fixWarning
Do not push changes directly to the main development branch.
Now you can:
- Add new files
- Modify existing files
- Fix bugs
- Improve documentation
After completing your work, check changed files:
git statusStage all modified files:
git add .Or stage a specific file:
git add filenameWrite meaningful commit messages.
git commit -m "docs: add Git contribution guide"git commit -m "fix: resolve navbar alignment issue"git commit -m "feat: add dark mode support"❌ updated file
❌ changes made
❌ final final fix
Tip
Clear commit messages make project history easier to understand.
Push your branch to your GitHub fork.
git push origin feature/your-feature-nameExample:
git push origin feature/navbar-fix- Open your fork on GitHub.
- Click Compare & Pull Request.
- Add a proper title and description.
- Submit the PR to the correct branch.
docs: add beginner-friendly Git guide
Sometimes your branch may conflict with the latest project changes.
Pull latest changes first:
git pull upstream masterFix conflicts manually in the affected files.
After resolving:
git add .
git commit -m "fix: resolve merge conflicts"If you made many unnecessary commits, squash them into one clean commit.
Start interactive rebase:
git rebase -i HEAD~3Replace 3 with the number of commits you want to combine.
Important
Squashing keeps commit history clean and professional.
✅ Pull latest upstream changes before starting work
✅ Use separate branches for every issue
✅ Write clean and readable code
✅ Use semantic commit messages
✅ Test your changes before pushing
✅ Read project contribution guidelines carefully
❌ Working directly on main or master
❌ Creating huge pull requests
❌ Writing unclear commit messages
❌ Ignoring merge conflicts
❌ Pushing unnecessary files
If you get stuck:
- Read the project documentation
- Ask maintainers politely
- Search GitHub Discussions or Issues
- Learn gradually — everyone starts somewhere 🚀
Happy Contributing! 🎉