This document gives causes and troubleshooting steps for when commits on a feature branch do not show in a promotion branch.
Note: This document applies to expanded branching model pipelines. Fix forward does not change Gitflow pipelines.
Glossary of important terms
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/
Stale PR - A promotion PR whose promotion branch does not contain all of the latest commits from its feature branch.
Fix PR - A PR that carries new feature branch commits forward through the pipeline, after the feature leaves its first environment. Fix PR branches use the name format gs-pipeline-fix/{featureBranch}_-_{env}
Expected behavior
Gearset syncs new commits differently for different pipeline positions:
Where the feature PR is open | What happens to new commits on the feature branch |
First environment of the pipeline | Gearset syncs the commits into the promotion branch automatically. |
A later environment | Gearset does not sync the commits. Gearset marks the promotion PR as stale. You must create a fix PR. |
PR not created in Gearset Pipelines (for example, from Compare and Deploy) | Gearset cannot find where the PR started. Gearset treats the PR as on its first environment and syncs the commits. |
PR open against the first environment
In this example, the branch Feature-1 has a PR open to the first environment, UAT.
When you add a commit to the feature branch, Gearset updates the promotion branch automatically. The two branches stay aligned.
Note: If you add a change to the promotion branch, Gearset does not update the feature branch. Do not change the promotion branch outside Gearset.
PR open against a later environment
After the feature leaves its first environment, Gearset does not sync new commits. This is expected behavior. It is not an error. Gearset marks the PR as stale and shows an alert.
To include the new commits:
Create a fix PR from your developer sandbox.
Promote the fix PR through the pipeline.
When the fix PR gets to the environment of the stale PR, Gearset merges the fix into the promotion branch.
Promote the feature PR as usual.
For the full procedure, refer to Fix Forward: How to edit or fix your features in progress. If you work in your VCS, refer to Fix Forward: How to edit or fix your features in progress from your version control system.
Caution: Do not merge a stale PR in your VCS. Gearset blocks promotion only inside Gearset. A merge in your VCS does not include the fix.
PRs opened before fix forward
A PR opened before this change can sync one last time. The sync occurs at the first of these events:
You push a new commit to the feature branch.
You promote the PR to the next environment.
After this sync, the PR follows the new behavior.
What factors can prevent successful branch syncing?
The factors below apply only when Gearset must sync the promotion branch. This is when the feature PR is open against the first environment of the pipeline. If the PR is on a later environment, Gearset does not sync by design. Refer to "PR open against a later environment" above.
Releases:
Gearset does not sync a promotion branch that is in a release or bundle. Fix PRs cannot merge into a release yet. To update the feature:
Commit the change to the feature branch.
If the PR is on the first environment, Gearset syncs the promotion branch. If the PR is on a later environment, create and promote a fix PR.
Add the feature back into the release.
Merge conflicts:
We have seen issues on the first environment where users add commits to a feature branch, and Gearset does not sync those commits to the promotion branch. For this to happen the users will have followed the following steps:
Creates a feature branch - commit changes, creates a PR to next Environment.
PR has a merge conflict on a file that needs to be solved.
Accept the Environment changes, mark as resolved and commit merge.
Go back to the feature branch and commit more changes.
Then we try and merge the feature branch into promotion branch.
5.1 If we notice any merge conflicts, we try and run a semantic merge automatically.
5.2. If it succeeds, then we push a commit to promotion branch, something like:Gearset: Synced feature branch. Merged feature branch X into promotion branch Y.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.
The feature branch has been updated, but the promotion branch does not contain this commit.
To address this issue, we have introduced a feature that ensures the promotion branch remains in sync with the original feature branch. If the promotion branch on the first environment falls out of sync, we automatically reset the promotion branch and derive directly from the feature branch.
This approach guarantees that the promotion branch always mirrors the most recent updates from the feature branch, thereby preventing discrepancies that could result in an unintended deployment of incomplete or outdated changes.
This is an example of the PR comment added to the Git when this happens.
This branch has been overwritten with the latest changes from the X branch due to merge conflicts arising from direct commits to this branch
Force Push Permissions
We utilize force push permissions in Git to update the promotion branch to match the original feature branch like the example above. However, there may be instances where this process fails due to factors such as insufficient user permissions, branch protection rules, or impending version control system issues.
If the automatic synchronization fails, you will see a new webhook error in your pipeline:
Updating all promotion branches to include the latest changes from the feature branch, as it has changed on remote
In that case, use the workaround below.
Multiple pipelines connected to the same repository:
If two or more pipelines use the same repository, a PR can stop syncing on its first environment. This occurs when a different connected pipeline has the same PR on a later environment.
Workarounds
Use this workaround only for a PR on the first environment that does not sync because of the factors above. For a PR on a later environment, create a fix PR. Do not use this workaround to move commits past environments.
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:
Ensure that the Auto-delete feature branches is unchecked, this will ensure that the feature branch is not deleted.
In pipelines find the PR that you are wanting to use this workaround on.
Before closing this PR, make sure to take note of the feature branch name.
Once you have the feature branch name, you close the PR using the bin icon.
Open your git provider and find the feature branch (in my case Feature-Dev2-Onboarding)
Open a PR from that feature branch to the branch of the first environment in your pipeline. In this example we are using GitHub, please consult your git providers documentation on how to do this if you are not using GitHub.
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)
The promotion branch is now up to date with the most recent commits from the feature branch.









