Develop Branch in Git — what it is, purpose and working principles

Author: IT Sectr Published: 2026-05-09 Reading time: 8 min

Develop Branch is the main integration branch in Git Flow where all completed feature branches are merged before preparing a release. Unlike main, develop contains the newest but not yet released changes — this is where daily code integration from all team developers happens. According to Atlassian, 2024, develop is a mandatory branch in Git Flow and provides a stable integration environment for the team.

Key Takeaways

  • Develop Branch is the development branch where all completed features are collected before preparing a release.
  • Source of feature branches — all new features are created from the latest develop commit.
  • Integration testing is performed on develop before creating a release branch.
  • Develop stability must be high — code here goes through code review and automated checks.
  • Merging into main happens only through a release branch, not directly from develop.

What is Develop Branch in Git

Develop Branch (development branch) is a long-lived branch in Git Flow that serves as the central hub for code integration from all developers. Feature branches are merged into it after development completion and code review.

Code in develop is always in a state ready for creating a release, although not yet deployed to production. This means that all features in develop have passed review, testing, and integration checks, but are still awaiting their release cycle.

Unlike main, where each code version is a release, develop contains a continuous stream of changes. Commits in develop appear as feature branches are merged, which can happen several times a day.

According to Vincent Driessen, 2010, develop is a key element of a successful branching model, as it separates draft work from versions ready for release.

Differences between develop and main branch

Understanding the differences between develop and main is critical for proper Git Flow workflow. These branches serve different functions and have different stability requirements.

CharacteristicDevelopMain / Master
PurposeIntegration of new featuresStable release code
StabilityHigh (after testing)Maximum (production)
Commit frequencyDaily (feature merging)Per release (every 1-4 weeks)
Branch sourceFeature branches created from itHotfix branches created from it
MergingFrom feature via PRFrom release via merge

Splitting into develop and main allows the team to continuously integrate new code without risking production version stability. Developers can see their code in develop immediately after PR approval, even before the official release.

Role of develop in Git Flow

In the Git Flow model, develop occupies a central place between feature branches (source of changes) and release branches (preparation for release). Understanding this hierarchy is the foundation of effective branching.

  • Feature → Develop — each completed feature is merged into develop via a Pull Request with code review.
  • Develop → Release — when enough changes have accumulated for a release, a release branch is created from develop.
  • Release → Main + Develop — after final preparation, the release branch is merged into main (release) and back into develop (bug fixes).
  • Hotfix → Main + Develop — critical fixes are created from main and merged into both branches.

This structure ensures that develop always contains the latest code with all new features, while main contains only verified production code. This is especially important for mobile projects with long review cycles in App Store and Google Play.

Develop’s relationship with other Git Flow branches

Develop serves as the central link between feature, release, and hotfix branches. Understanding merge directions is essential for preventing conflicts and commit loss.

Code quality requirements in develop

Code quality in develop must be high, but not absolute. Unlike main, where every error means an urgent hotfix, develop allows minor imperfections that will be fixed before release.

Minimum requirements for code before merging into develop:

  • Compilation — code must compile without errors. A broken build in develop blocks the entire team’s work.
  • Unit tests — all existing tests must pass. New code must be covered by tests at least 70%.
  • Code style — code must conform to the team’s accepted formatting and naming standards.
  • No deprecated API — use of deprecated methods is not allowed in new code.

Automated checks in the CI/CD pipeline should run on every push to develop. If the build breaks, the responsible developer must fix the issue within an hour or revert their commit.

CI/CD checks for develop

Setting up GitHub Actions for develop ensures that every PR goes through automated checks before merging. A typical pipeline includes build, tests, and linting.

yaml
# GitHub Actions — checking develop after merge
name: Develop CI

on:
  pull_request:
    branches: [develop]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Unit tests
        run: ./gradlew testDebug
      - name: Lint
        run: ./gradlew lint
      - name: Build
        run: ./gradlew assembleDebug

Merge rules for develop

Merging into develop must follow strict rules to maintain the stability of the integration branch. Violating these rules leads to conflicts, broken builds, and wasted team time.

  • Only via Pull Request — direct push to develop is prohibited. All changes go through code review.
  • Minimum one approve — PR must be approved by at least one developer not involved in the task.
  • Squash merge — it is recommended to combine all feature branch commits into one when merging into develop for a clean history.
  • PR must be up-to-date — before merging, PR must be updated relative to the latest develop commit (rebase or merge).

The PR up-to-date rule is especially important. If a feature branch was created a week ago and develop has moved 50 commits ahead, direct merging could lead to conflicts that are better resolved in the context of the PR rather than in develop.

Protecting develop from incorrect merges

Branch protection rules are settings at the GitHub, GitLab, or Bitbucket level that prevent incorrect changes to develop. They ensure that even an accidental push won’t break the integration branch.

Recommended protection rules for develop:

  • Require pull request — prohibit direct push to develop. All changes only via PR.
  • Require approvals — minimum 1-2 approvals before merging PR.
  • Require status checks — block merging if CI/CD pipeline has not passed.
  • Require up-to-date — PR branch must be updated relative to develop before merging.
  • Restrict push access — limit push rights to develop only for senior developers.

Setting up develop protection takes 10 minutes but prevents weeks of downtime related to a broken integration branch. For mobile projects with multi-platform teams, this is especially relevant.

Example commands for working with develop

Let’s consider a typical developer’s day: in the morning they update develop, create a new feature branch, and after completing the task merge changes back into develop.

bash
# Morning develop sync
git checkout develop
git pull origin develop

# Creating a new feature branch from develop
git checkout -b feature/add-push-notifications

# Working on the feature...
git add . && git commit -m "Add FCM integration"

# Updating develop during development
git fetch origin develop
git rebase origin/develop

# After PR approval — update local develop
git checkout develop
git pull origin develop
git branch -d feature/add-push-notifications

The git pull command in develop performs two operations at once: git fetch (retrieves new commits from the server) and git merge (merges them with the local branch). For develop, this is the standard synchronization method.

Recovering develop after a broken merge

If code that broke the build gets into develop, you need to act quickly. Every hour of develop downtime is blocked work for the entire development team.

If code that broke the build gets into develop, use git revert to create a new commit that undoes the problematic changes. Do not use git reset in develop — it rewrites history that other team members already have.

bash
# Finding the problematic commit
git log --oneline develop

# Reverting a commit via revert (safe)
git revert a1b2c3d

# Pushing the fix to remote develop
git push origin develop

# Viewing changes in a specific commit
git show a1b2c3d --stat

Frequently Asked Questions

Is a develop branch necessary in a small project?

For projects with one or two developers, develop is often redundant — main and feature branches are sufficient. Once the team grows to 3+ people, develop becomes necessary to isolate unfinished features from stable production code.

Can I commit directly to develop?

No, direct commits to develop are prohibited in any professional project. All changes go through a Pull Request with code review and automated checks. The exception is administrative edits to README or CI configuration, but even these are better done through a PR.

How is develop different from trunk-based development?

In trunk-based development, there is no separate develop branch — all developers work in main with very short feature branches (1-2 days). This is an alternative to Git Flow, popular in DevOps culture with high levels of test automation.

How often should develop be updated with release changes?

After each release, the release branch is merged back into develop to incorporate all fixes made during release preparation. If this is not done, develop will diverge from the release code, causing conflicts in the next release.

What to do if develop is broken and no one can create a PR?

If develop is broken, a senior developer creates a hotfix branch from the last stable commit, fixes the issue, and merges the fix directly into develop via a PR with special status. After recovery, a root cause analysis is conducted.

Summary

  • Develop Branch is the central integration branch in Git Flow where all completed feature branches are merged after code review.
  • Splitting develop and main allows isolating unfinished features from stable production code, reducing the risk of release errors.
  • Code quality in develop must be high: compilation, passing tests, and code style are checked automatically.
  • Direct push to develop is prohibited — only via Pull Request with at least one colleague’s approval.
  • Branch protection through branch protection rules prevents accidental breakage of the integration environment.
  • Release branch is created from develop, and after release is merged back, synchronizing develop with the actual code state.
  • Recommendation: set up CI/CD checks on every push to develop and require PR to be up-to-date before merging.

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also