Local Environment Setup

Bitbucket Branch-Based Workflow

Standard branch-based development workflow for CrelioHealth Bitbucket repositories (2026 update)

👤 Ritu Kataria

Bitbucket Branch-Based Workflow (2026 Update)

Removal and Backup of Current Setup (if applicable)

If you are migrating from an older fork-based workflow, follow these steps to back up and clean up your current Git configuration before switching to the new branch-based workflow:

  1. Backup your current git remote configuration:
    git remote -v > ~/git-remotes-backup.txt
  2. Remove old fork and upstream remotes (if present):
    git remote remove origin
    git remote remove upstream
  3. (Optional) Delete your old fork on Bitbucket after migration is complete.

Once this is done, proceed with the steps below for the new branch-based workflow.

Note: Bitbucket Cloud is deprecating cross-workspace fork support. All new joiners must use the branch-based workflow described below. Forking is no longer required or supported for CrelioHealth repositories.

Overview

All development now happens via feature branches in the main repository. Forks are not used. You will push your feature branches directly to the main repository and create pull requests from there.

Protected branches: main, develop, hotfix (no direct pushes allowed)

Feature branches: Must follow the naming convention below and are created from develop or hotfix.


Initial Setup

  1. Your Bitbucket access will be provided by the onboarding team.
  2. Clone the repository:
    git clone git@bitbucket.org:creliohealth-repo/livehealthapp.git
    cd livehealthapp
  3. Sync your local base branches:
    git fetch origin
    git checkout main && git reset --hard origin/main
    git checkout develop && git reset --hard origin/develop
    git checkout hotfix && git reset --hard origin/hotfix  # if applicable

Creating and Working on Feature Branches

  1. Start from the correct base branch:
    git checkout develop  # or hotfix
    git pull origin develop
  2. Create your feature branch (use the naming convention):
    git checkout -b develop/yourname/EN-1234-brief-description
    • Example: develop/ritu/EN-1123-aoe-in-crm
  3. Work on your changes and commit:
    git add .
    git commit -m "EN-1234: Add MRN duplicate validation"
  4. Push your branch to the main repository:
    git push origin develop/yourname/EN-1234-brief-description
  5. Create a Pull Request (PR) on Bitbucket:
    • Source: your feature branch
    • Target: develop or hotfix (as appropriate)

Keeping Your Feature Branch Updated

git checkout develop/yourname/EN-1234-brief-description
git pull --rebase origin develop
# Resolve conflicts if any, then:
git rebase --continue
git push origin develop/yourname/EN-1234-brief-description

Branch Naming Convention

Format: base-branch/username/TICKET-ID-brief-description

  • base-branch: develop, hotfix, or main (source branch)
  • username: your identifier (e.g., ritu, rahul, sai)
  • TICKET-ID: Jira ticket number (e.g., EN-1123)
  • brief-description: short summary in kebab-case

Examples:

  • develop/ritu/EN-1123-aoe-in-crm
  • hotfix/rahul/EN-1200-fix-login-bug

Branch Cleanup Policy

Branches for completed (Done) Jira tickets are deleted from the repository every weekend. You are encouraged to delete your local and remote feature branches after your PR is merged.

# Delete local branch
git branch -d develop/yourname/EN-1234-brief-description
# Delete remote branch
git push origin --delete develop/yourname/EN-1234-brief-description

FAQ

  • Do I need a fork? No, all work is done in the main repository.
  • Can I push to main/develop/hotfix? No, these are protected. Use feature branches and PRs.
  • What if my branch name is wrong? Rename it: git branch -m old-name develop/yourname/EN-1234-new-name
  • Who merges PRs? Only authorized reviewers/engineers.
  • What if I have issues? Contact a senior developer or Bitbucket admin.

This branch-based workflow is now the standard for all new joiners.

On this page