Git Workflow
Learn how to work with Git branches, commits, and pushing changes for Olive Code projects.
All Olive Code projects use Git for version control. When you claim a project, you receive your own branch to work on. This page covers the Git workflow you'll use for development.
After claiming a project, you'll receive access to the GitHub repository. Clone it to your local machine:
# Clone the repository git clone https://github.com/[organization]/[project-name].git # Navigate into the project cd [project-name]
Replace [organization] and [project-name] with the actual values from the project details page.
Your worker branch is automatically created when you claim the project. Check it out:
# List all branches (including remote) git branch -a # Checkout your worker branch git checkout worker-[your-pseudonym] # If the branch is remote-only, track it locally git checkout -b worker-[your-pseudonym] origin/worker-[your-pseudonym]
Your worker pseudonym is shown in your account settings and on the project page. It's a unique identifier like curious-fox or swift-eagle.
Make small, focused commits with descriptive messages. This makes it easier to track changes and understand the development history.
# Stage your changes git add . # Commit with a descriptive message git commit -m "Add user authentication with Firebase" # Good commit message examples: # - "Implement product listing page with filtering" # - "Fix responsive layout on mobile devices" # - "Add form validation for contact form" # - "Connect Firestore for user data persistence"
Commit message best practices:
- Be specific – Describe what changed and why
- Use present tense – "Add feature" not "Added feature"
- Keep it concise – First line should be under 72 characters
- Reference features – Mention the PRD feature you're implementing if applicable
Push your commits to your worker branch on GitHub. This triggers a Vercel preview deployment.
# Push to your worker branch git push origin worker-[your-pseudonym] # Or if you've set up tracking git push
Pushing often creates more preview deployments, giving you more checkpoints to test and share with the client. It also backs up your work.
Olive Code projects typically have these branches:
| Branch | Purpose | Who Uses It |
|---|---|---|
main | Production code | Production deployments |
staging | Pre-production testing | Admin/review process |
worker-[pseudonym] | Your development branch | You (the worker) |
You should only push to your worker branch. The main and staging branches are managed through the project completion and promotion process.
Never push directly to main or staging. All production updates go through the formal review and promotion process.