Thanks for contributing to this project! This guide explains the exact workflow for contributors and the repository owner.
- Click the Fork button on the original repository.
- This creates a copy under your GitHub account.
git clone https://github.com/YOUR_USERNAME/REPO_NAME.git
cd REPO_NAMEThis keeps your fork updated with the original repo.
git remote add upstream https://github.com/OWNER_USERNAME/REPO_NAME.git
git remote -vNever work directly on main.
git checkout -b feature/your-feature-name- Write clean, readable code
- Follow the project’s coding style
- Test before committing
git add .
git commit -m "Add: short meaningful description"Before pushing, always sync with the owner’s repo:
git fetch upstream
git merge upstream/mainIf conflicts occur, resolve them locally before continuing.
git push origin feature/your-feature-name-
Go to your fork on GitHub
-
Click Compare & pull request
-
Clearly describe:
- What you changed
- Why you changed it
-
Submit the PR
- Make requested changes
- Commit again
- Push to the same branch (The PR updates automatically)
- Check code quality
- Check logic and edge cases
- Ask for changes if needed
git fetch origin
git checkout feature/branch-name- Prefer Squash and Merge for clean history
- Or Rebase and Merge if commits are clean
After merging:
- Delete the contributor’s branch (GitHub prompt)
- Keep the repository clean
Regularly sync your fork:
git checkout main
git fetch upstream
git merge upstream/main
git push origin main- No direct pushes to
main - One feature per branch
- Clear commit messages
- No broken builds
- Respect code review feedback
Happy coding 🚀