# Ensure Require Branches to Be Updated with Base Before Merge

- Source: https://support.icompaas.com/support/solutions/articles/62000235196-ensure-require-branches-to-be-updated-with-base-before-merge
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS GitHub Benchmark v1.0.0](https://support.icompaas.com/support/solutions/62000112695) › [CIS GitHub Benchmark v1.0.0](https://support.icompaas.com/support/solutions/folders/62000169264)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:** **Level 1**

**Description:  
** Open Git branches must be synchronized with the latest changes from the target base branch (e.g., main or master) before being merged. This ensures that the code being merged is tested and compatible with the most current version of the codebase, reducing integration conflicts and maintaining stability.

**Rationale:  
** Requiring branches to be up to date before merging minimizes merge conflicts and integration errors. It ensures that changes are validated against the latest code, improving code quality, reducing regression risks, and supporting smooth collaboration among development teams.

**Impact:  
****Pros**:

-   Prevents merge conflicts and integration issues.  
      
    
-   Ensures compatibility with the latest codebase.  
      
    
-   Supports stable and reliable software releases.  
      
    
-   Encourages continuous synchronization and testing.  
      
    

**Cons**:

-   May introduce delays if base branch changes frequently.  
      
    
-   Requires developer discipline to regularly update branches.  
      
    

**Default value:  
**Some repositories allow merging branches without ensuring they are updated with the latest base branch changes.

**Audit:  
** Verify repository or pull request settings enforce branch updates before merges. Check merge records to confirm branches were up to date at merge time.

**Remediation**:  
 Configure branch protection or merge policies to require branches to be rebased or merged with the latest base branch before merging. Communicate policies to development teams and provide guidance on updating branches.

**References**:

1.  GitHub Branch Protection Rules: [https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-protected-branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-protected-branches)
    
2.  GitLab Merge Request Settings: [https://docs.gitlab.com/ee/user/project/merge\_requests/](https://docs.gitlab.com/ee/user/project/merge_requests/)
    
3.  CIS Controls v8, Control 6 - Maintenance, Monitoring, and Analysis of Audit Logs: [https://www.cisecurity.org/controls/maintenance-monitoring-and-analysis-of-audit-logs/](https://www.cisecurity.org/controls/maintenance-monitoring-and-analysis-of-audit-logs/)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
