GitHub Repository Features Worth Adopting Immediately

Once repositories are on GitHub Enterprise, there are several features worth configuring immediately to maximise the value of the migration.
Branch Protection Rules
GitHub's branch protection rules allow you to enforce quality and safety standards on key branches. For a typical main branch, you might configure:
- Require pull request reviews before merging (with a minimum reviewer count)
- Require status checks to pass (e.g., CI builds, test runs)
- Require branches to be up to date before merging
- Restrict who can push directly to the branch
- Require signed commits for auditability
- Block force pushes and deletions
These rules can be defined in the GitHub UI or managed as code using Terraform with the GitHub provider, enabling consistent enforcement across all repositories.
Code Owners
The CODEOWNERS file allows teams to declare ownership of specific directories or file types within a repository. When a pull request touches a file owned by a team or individual, GitHub automatically requests a review from that owner.
Example CODEOWNERS file:
# Global owners - review all changes
* @my-org/platform-team
# Frontend code
/src/frontend/ @my-org/frontend-team
# Infrastructure as code
/infra/ @my-org/devops-team
This removes the manual step of remembering to add reviewers and ensures the right people are always involved in reviewing changes to sensitive parts of the codebase.
Repository Templates
For new projects going forward, GitHub repository templates allow you to pre-populate new repositories with:
- A standard directory structure
- Default GitHub Actions workflows
- A CODEOWNERS file
- Issue and pull request templates
- A CONTRIBUTING.md and README.md
- A default .gitignore and licence file
This dramatically reduces the time to get a new project off the ground whilst ensuring it starts with the right foundations.
Issue and Pull Request Templates
GitHub supports Markdown templates for issues and pull requests, ensuring contributors provide the right information when raising bugs, feature requests, or changes. These templates live in the .github/ directory of the repository and are surfaced automatically when users open a new issue or pull request.
Validating the Migration
Comparing commit counts and branch history between Azure DevOps and GitHub after migration
After migrating each repository, it is good practice to validate the result before decommissioning the Azure DevOps source:
- Verify commit count: compare the total number of commits in the GitHub repository against the Azure DevOps source
- Verify branches and tags: check that all branches and tags are present
- Check pull request history: confirm that historical pull requests have been imported correctly
- Test a clone: clone the GitHub repository and verify the working tree matches the expected state
- Run the CI pipeline: trigger the migrated or newly configured GitHub Actions workflow to confirm the build passes
Post-Migration Housekeeping
Once repositories are live on GitHub Enterprise:
- Archive or delete the Azure DevOps repositories to avoid confusion (set them to read-only first)
- Update any documentation, runbooks, or onboarding guides that reference Azure DevOps URLs
- Update local developer environments - developers will need to update their Git remote URLs (git remote set-url origin <new-github-url>)
- Revoke Azure DevOps personal access tokens (PATs) that are no longer needed
Conclusion
Migrating repositories from Azure DevOps to GitHub Enterprise is a well-supported process with mature tooling and clear best practices. By using the GitHub Enterprise Importer, planning your migration in waves, and adopting GitHub's repository features from day one, you can complete the move with minimal disruption while immediately delivering a better experience for your development teams.
The next article in this series looks at the other major component of the migration: transforming Azure Pipelines into GitHub Actions workflows.