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 (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.
Understanding the differences between develop and main is critical for proper Git Flow workflow. These branches serve different functions and have different stability requirements.
| Characteristic | Develop | Main / Master |
|---|---|---|
| Purpose | Integration of new features | Stable release code |
| Stability | High (after testing) | Maximum (production) |
| Commit frequency | Daily (feature merging) | Per release (every 1-4 weeks) |
| Branch source | Feature branches created from it | Hotfix branches created from it |
| Merging | From feature via PR | From 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.
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.
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 serves as the central link between feature, release, and hotfix branches. Understanding merge directions is essential for preventing conflicts and commit loss.
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:
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.
Setting up GitHub Actions for develop ensures that every PR goes through automated checks before merging. A typical pipeline includes build, tests, and linting.
# 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
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.
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.
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:
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.
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.
# 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.
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.
# 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
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.
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.
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.
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.
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
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.
Read also