Skip to main content
US Army Corps of EngineersInstitute for Water Resources, Risk Management Center

Merging to Main

Merge Requirements

Before merging, ensure:

  1. At least 1 approval from an Organization Owner
  2. All review conversations resolved
  3. Branch is up to date with main
  4. No merge conflicts
  5. CI checks pass (when implemented)

Merge Process

GitHub web interface (recommended):

  1. Click "Merge"
  2. Edit the commit message to be clear and descriptive
  3. Confirm merge
  4. Delete the source branch automatically (check the box)

Command line (if needed):

git checkout main
git pull origin main
git merge --squash feature/your-feature
git commit -m "feat(scope): clear description of feature"
git push origin main

Post-Merge

Immediately after merging:

  1. Delete the feature branch (automated via GitHub)
  2. Verify main branch builds successfully
  3. Monitor for any issues in deployed environments
  4. Close any linked issues if not automatically closed

If something breaks:

  1. Create hotfix branch immediately
  2. Fix the issue
  3. Create a PR (can be fast-tracked)
  4. Merge after quick review
  5. Consider reverting the original PR if the hotfix is complex