Skip to main content
All CollectionsTroubleshootingPipelinesPipelines
Why is my commit not being reflected in the promotion branches?
Why is my commit not being reflected in the promotion branches?

When adding commits into a feature branch, the commits should be reflected in any open promotion branches.

Quinn Kuiper avatar
Written by Quinn Kuiper
Updated over a week ago

This document outlines some reasons and troubleshooting steps that users can take to work out why commits being made into the feature branch are not being reflected in the promotion branch.

Glossary of important terms

Feature branch - This is the original branch that is created, where all the features are originally added into.

Promotion branch - These are the branches that are automatically created by Gearset. These are preceded by gs-pipeline/

Expected behavior

When adding a commit to a feature branch, Gearset will automatically add these commits into any promotion branches linked to that feature branch.

In this example we have the branch Feature-1. With a PR opened to UAT.

Adding a commit to the original feature branch will automatically update the promotion branch so that they are aligned.

Note: Adding a change to the promotion branch will not update the feature branch.

What factors can prevent successful branch syncing?

Releases:

When updating a feature branch, where the promotion branch is in a release, Gearset will not automatically sync that promotion branch. If that branch needs updating then abandon the release and update the feature branch, this will update the promotion branch which you can then add back into the release.

Merge conflicts:

We have seen issues where users are adding commits to a feature branch and those commits are not being synced to the promotion branches. For this to happen the users will have followed the following steps:

  1. Created a PR that has a merge conflict on a file that needs to be solved.

  2. Accept the Environment changes, mark as resolved and commit merge.

  3. Go back to the feature branch and commit more changes, if the change that you commit also forms a merge conflict with the file that you have selected, then this will not be updated in the promotion branch. In this example my commit contains a change in the text box length.

  4. Here you can see the feature branch has been updated, but the promotion branch does not contain this commit.

If this PR is merged into the next environment, Gearset will see a difference between the long lived environment and the feature branch and create a Sync PR (named Sync: Feature branch) which can be promoted into the environment.

Once this has been promoted the PR will open to the next environment as expected.

Workarounds

If you are unable to promote changes in the pipeline due to this, then the easiest way to workaround this is by closing and re-opening the PR.

To do this:

  1. Ensure that the Auto-delete feature branches is unchecked, this will ensure that the feature branch is not deleted.

  2. In pipelines find the PR that you are wanting to use this workaround on.

  3. Before closing this PR, make sure to take note of the feature branch name.

  4. Once you have the feature branch name, you close the PR using the bin icon.

  5. Open your git provider and find the feature branch (in my case Feature-Dev2-Onboarding)

  6. Open a PR from that feature branch to the long lived branch where the feature was last stuck at. In this example we are using GitHub, please consult your git providers documentation on how to do this if you are not using GitHub.

  7. The PR should now be in the pipeline again ready to be promoted (Note: the name seen in Gearset will be the name of the PR that you created)

  8. The promotion branch is now up to date with the most recent commits from the feature branch.

Did this answer your question?