Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
Step 1: Protect Your Main Branch Using Branch Policies
Branch name pattern: main
Require pull request reviews before merging: ✔️
Require status checks to pass before merging: ✔️
Include administrators: ✔️
Step 2: Create and Work in Feature Branches
// Clone the repo (if you haven’t already)
git clone https://github.com/username/repo.git
cd repo
// Create a new feature branch
git checkout -b feature/add-login-form
git add .
git commit -m "feat: add basic login form and validation"
Step 3: Keep Your Local Branch Up to Date
git fetch origin
git checkout main
git pull origin main
// Rebase your feature branch onto the updated main
git checkout feature/add-login-form
git rebase main
# After fixing conflicts in files:
git add
git rebase --continue
Step 4: Run Automated Tests Locally
npm install
# or
yarn install
npm test
# or for Jest:
npm run test:watch
Step 5: Use Continuous Integration (CI) Pipelines
name: CI Pipeline
on:
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- run: npm test
Step 6: Submit Pull Request and Conduct Code Review
git push --set-upstream origin feature/add-login-form
// After changes based on feedback
git add .
git commit -m "fix: address review comments"
git push
Step 7: Merge Safely and Monitor Production
git checkout main
git pull origin main
// Example: Tail logs on a Linux server
ssh user@server "tail -f /var/log/app.log"
# On GitHub you can click “Revert” in the merged PR
git revert
git push origin main
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.