Welcome! We’re using a Fork + Pull Request model to manage contributions for this project. This workflow helps reduce merge conflicts and ensures clean, reviewed code changes.
- For Fork-Based Contributors
- For All Contributors
- Pull Request Guidelines
- Branch Naming Convention
- Code Style
Click the Fork button on the top-right of this repo.
git clone https://github.com/<your-username>/CodeSync.git
cd codeSync
# Verify remotes
git remote add upstream https://github.com/Devgambo/CodeSync.gitgit checkout -b feat/your-feature-name
# Follow branch naming convention
# Make your changes
git add .
git commit -m "feat: add feature description"
git push origin feat/your-feature-nameBefore creating a PR, make sure your feature branch is built on the latest main from the upstream repo:
# 1. Fetch all branches from upstream
git fetch upstream
# 2. Switch to your local main branch
git checkout main
# 3. Merge the latest changes from upstream/main
git merge upstream/main
# Fix any conflicts, then
# 4. Push the updated main to your fork
git push origin main
# 5. Rebase (or merge) your feature branch onto the updated main
git checkout feat/your-feature-name
git rebase main # or: git merge mainAlternative: Or Use GitHub UI
- On your fork on GitHub, click the Fetch upstream button (above the file list).
- Click Fetch and merge to sync your fork’s
mainwith the original repo. - Pull the updated
mainlocally:git pull origin main
- Rebase or merge your feature branch onto the refreshed
mainas shown above.
- Go to your fork → switch to your feature branch → click Compare & pull request.
- Base repository:
Devgambo/codeSync→ Base branch:main.
- Always work on a separate branch (never directly on
main). - Keep your branch focused on a single change or feature.
- Regularly sync with the main repo to avoid conflicts.
- Open a pull request from your branch into
main. - One of us will review and merge it once approved.
-
Provide a clear title and description.
-
Link related issues if any (
Closes #issue-id). -
Ensure your branch is up-to-date with
main. -
Use Conventional Commits:
feat: add user login feature fix: resolve layout overflow in dashboard refactor: optimize database queries
| Type | Prefix | Example |
|---|---|---|
| Feature | feat/ |
feat/user-authentication |
| Bug Fix | fix/ |
fix/login-validation |
| Refactor | refactor/ |
refactor/db-queries |
| Docs | docs/ |
docs/contributing-guide |
- Use Prettier & ESLint if available.
- Follow consistent indentation and naming.
- Write self-documenting code.
- Include comments for complex logic.
- Test before committing.
- Follow SOLID principles.