Skip to main content
The Morph Platform uses a structured branching strategy to keep your migration organized, reviewable, and safe. Every code change happens on an isolated branch—nothing is merged to your mainline without your explicit approval.

Feature Branch

Every project has a feature branch that acts as the integration point for all migration work. This branch is shared across all target repositories in the project.
  • Default name: morph-main
  • Customizable: You set the feature branch name during project creation if your organization has naming conventions (e.g., feature/modernization, migration/java-to-kotlin), and you can rename it later, until milestone work starts
  • Scope: The same feature branch name is used for all target repositories in the project
The feature branch is where completed milestone work accumulates. Each milestone merges into this branch, building up the full migration incrementally.

Renaming the feature branch

Rename the feature branch when the Morph Platform can’t create it in one of your repositories: for example, another branch’s name overlaps it (a branch morph-main/old blocks morph-main, and a branch team blocks team/morph), or a repository rule only allows names that match a pattern such as feature/*. The Morph Platform tells you which one it hit, and offers Rename branch wherever a new name would fix it:
  • in the The Morph Platform is missing access it needs alert on the project page (Rename Branch & Recheck, or a Rename branch link next to the rule’s own link)
  • in the Knowledge chat, on the error or the Repository setup failed alert
Click Rename branch, enter the new name in Feature branch, and click Rename. The name doesn’t have to start with morph-. The Morph Platform uses the new name for everything it creates from then on and rechecks its access to your repositories with that name.
  • When: only until milestone work starts. Once a milestone has run, or a milestone branch exists, the rename is refused with “The project branch can’t be renamed once milestone work has started.”, because that work is based on the current branch.
  • Names refused: a name Git doesn’t accept as a branch name, and any repository’s base branch (such as main), since the Morph Platform would then push its work and open its pull requests directly onto your mainline.
  • Existing branch: if a branch with the new name already exists in a repository, the Morph Platform uses that branch, including any commits already on it.
  • Old branch: the old branch isn’t deleted from repositories where the Morph Platform had already created it. Delete it yourself if you don’t need it.
  • Knowledge chat: a chat keeps the branch its workspace was set up with. After renaming from a chat whose repository setup failed, the Morph Platform starts a new chat, which uses the new name.
  • Permission: renaming needs permission to update the project. Without it, Rename branch isn’t shown.

Project Start Point

At project creation time (or, for a repository added later, when it is added), the Morph Platform records the commit SHA of each repository’s origin branch. This SHA marks the project’s starting point and serves as the baseline for tracking what has changed in the upstream mainline since the project began. You can click the icon next to the repo name (on the top left of the project page) to see those changes.

Upstream Changes

As your team continues pushing changes to the repository’s mainline during the migration, the Morph Platform makes it easy to stay aware of what’s changed. Viewing upstream changes: On the project page, below the project title, you can see a list of all project related repos with a diff icons (). Click it to see all upstream commits pushed to the repository’s mainline since the project started (i.e., since the recorded start SHA).

Upstream Sync

Between milestones, you can trigger an upstream sync to incorporate mainline changes into your migration. This is useful when significant upstream work has landed and you want the migration to stay aligned with the latest codebase state. When triggered, upstream sync will:
  1. Update the project’s starting SHA to the current mainline HEAD
  2. Create an ad-hoc sync milestone that follows the standard milestone procedure—including code review, functional testing, and PR creation
  3. Rebase any in-progress milestone branches so they incorporate the new baseline
  4. Adjust the plan for upcoming milestones to account for the upstream changes
The sync milestone goes through the same lifecycle as any other milestone: the agent executes the work, creates a PR, and you review and merge before continuing. You can merge a sync PR with any merge strategy. A squash merge or a rebase merge drops the link between the feature branch and the mainline commit it synced, so git would still see those mainline changes as unmerged. When that happens, the Morph Platform pushes one extra commit to the feature branch, titled Record upstream sync ancestry for Milestone N (no content change), where N is the sync milestone’s number (for example 3.1). The commit changes no files. It records the mainline merge so the next sync and the end-of-project PR don’t redo conflicts you already resolved. A regular merge commit keeps that link, so no extra commit is pushed. the Morph Platform pushes this commit directly to the feature branch, and it is a merge commit. If your branch rules block direct pushes (for example a GitLab protected branch or an Azure DevOps branch policy) or merge commits (GitHub’s Require linear history), the commit isn’t pushed, and a later sync may ask you to resolve the same conflicts again. To avoid this, merge sync PRs with a merge commit when your rules allow it, so no extra commit is needed. With Require linear history, merge commits aren’t allowed either way, so expect to resolve some conflicts again on later syncs.
Upstream sync is not supported in projects that were created before this feature was introduced. Only projects created after upstream sync became available can use it.

Milestone Branches

Each milestone gets its own branch, branched off from the feature branch:
  • Naming format: <project_name>-milestone_<milestone_number>-<uuid>
  • Example: payments-api-migration-milestone_3-a1b2c3d4
This keeps each milestone’s work isolated until it passes review. The milestone lifecycle is:
  1. The Morph Platform creates the milestone branch from the feature branch
  2. The agent commits all task work to this branch
  3. On completion, the Morph Platform creates a PR from the milestone branch → feature branch
  4. You review and merge the PR
  5. Dependent milestones are unlocked; sibling milestone branches may receive a rebase if they share dependencies with the merged code
When milestones are independent (no shared file dependencies), multiple milestone branches can exist simultaneously. Each runs in isolation and produces its own PR. When one of them merges, the Morph Platform checks whether remaining in-progress branches need to incorporate the new code. If so, it flags them as Rebase Required and the agent handles the integration automatically when you trigger it.

Git hooks

When the Morph Platform commits and pushes a milestone run’s work, your repository’s git hooks (husky, lint-staged, commitlint, pre-commit) don’t run. Git LFS files are still uploaded. If you rely on a hook to enforce a check, run the same check in your CI on pull requests, or add it to a lifecycle script such as lint, so the Morph Platform runs it during validation.

End-of-Project PR

When all milestones are complete and merged into the feature branch, the Morph Platform creates a final Pull Request from the feature branch to the target branch:
  • Default target: The repository’s default branch (e.g., main, master)
  • Customizable: You can select a different target branch during project creation if needed
This final PR represents the entire migration in one reviewable unit. Your team can review it holistically, run CI/CD, and merge when ready.
Point your project at a branch that will still exist when the migration finishes. The Morph Platform measures the whole migration against the branch you start from, and delivers the final pull request back into it. If that branch is deleted mid-project, the project cannot be recovered and has to be started again.Use a long-lived branch — main, master, develop — and not a temporary or release branch that may be cleaned up along the way.

Branch Flow Diagram


Supported Git Providers

The Morph Platform supports all major Git providers:

GitHub

GitHub.com integration via GitHub App

GitLab

GitLab.com integration via OAuth

Azure DevOps

Azure DevOps Services via Microsoft Entra ID

Summary


Reviewing Pull Requests

How to review and merge milestone PRs

Core Concepts

Project setup and branch strategy overview

Roadmap

How your migration is organized and tracked

Milestones & Tasks

The milestone execution lifecycle