Skip to main content

How to forward fix an open release branch in a Gitflow pipeline

Best practices for forward fixing on an open release branch in the event that you discover bugs which need to be resolved in Gitflow.

Written by Brandon Chin Loy
Updated today

In Gitflow, we strongly recommend that you create a release branch once you are confident that all the combined changes in your designated integration branch are stable and behave as expected. However, it could happen that while testing your release in later environments, you discover an unexpected issue that needs to be fixed before the release can be safely deployed to production.

Below are steps to making a fix on the release branch, re-deploying it to your release environment and syncing those changes back to your integration branch.

Option 1: Pipelines (Recommended)

Below are the instructions for creating and merging bug fixes directly in Pipelines:

  1. Open your release node and select the New feature button:

  2. Select the developer sandbox where you made the changes:

  3. Name your feature branch according to your preferred naming convention:

  4. Select Compare now and proceed with our usual C&D workflow to commit your changes/fixes to your new feature branch.

  5. Once you have committed your changes to the feature branch, go back to your release node and select the Bug fixes tab:

  6. Select your feature branch from the dropdown menu and create a pull request. This will be created against your release branch:

  7. Once your pull request has been created, go to the Open pull requests tab and merge your changes into your release branch when ready:

Once your feature branch has been merged back into your release branch, it will appear in the list of features in your release details:

If you have an environment linked to your release node, you must re-deploy the release so that your changes are reflected in your org:


Furthermore, you cannot open a pull request against production until all bug fix feature branches are resolved.

Option 2: Compare & Deploy

  1. Note the name of your release branch (gs-gitflow-release/<GUID>) shown at the top of the release node:

  2. Go to Compare & Deploy.

  3. Select the developer sandbox where you made the changes as the source. For the target, select Source control, your Gitflow repo, and then the above release branch name:

  4. Choose Create new branch from gs-gitflow-release/<GUID> and give the feature branch a name:

  5. Select Compare now and go through our normal C&D workflow to commit your changes/fixes to this feature branch.

  6. Once you have committed your changes, select Create pull request:

  7. Enter your pull request details and ensure your target branch is your release branch (gs-gitflow-release/<GUID>):


    Once this is done, you can create the pull request against your release branch.

From here, go back to your pipeline and follow the guidance from Step (7) under Option 1: Pipelines above this section.

Syncing Changes to Earlier Environments

Any additional features/commit added to an open release branch must be synced back to your designated integration branch to ensure they are aligned. If you wish to do this before your release is deployed to production, follow the steps below for creating a sync PR from your release branch to your integration branch:

  1. Open your release environment and select Create sync PRs:

  2. Select Create pull request:

  3. You’ll now see a sync PR opened against your earlier environment. Promote it to sync your integration branch with the changes from the release:

Did this answer your question?