This version of GitHub Enterprise was discontinued on 2023-03-15. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.
After a site administrator upgrades your Enterprise Server instance to Enterprise Server 3.9 or later, the REST API will be versioned. To learn how to find your instance's version, see "About versions of GitHub Docs". For more information, see "About API versioning."
Branches
Use the REST API to modify branches and their protection settings.
- Branches
- List branches
- Get a branch
- Rename a branch
- Sync a fork branch with the upstream repository
- Merge a branch
- Protected branches
- Get branch protection
- Update branch protection
- Delete branch protection
- Get admin branch protection
- Set admin branch protection
- Delete admin branch protection
- Get pull request review protection
- Update pull request review protection
- Delete pull request review protection
- Get commit signature protection
- Create commit signature protection
- Delete commit signature protection
- Get status checks protection
- Update status check protection
- Remove status check protection
- Get all status check contexts
- Add status check contexts
- Set status check contexts
- Remove status check contexts
- Get access restrictions
- Delete access restrictions
- Get apps with access to the protected branch
- Add app access restrictions
- Set app access restrictions
- Remove app access restrictions
- Get teams with access to the protected branch
- Add team access restrictions
- Set team access restrictions
- Remove team access restrictions
- Get users with access to the protected branch
- Add user access restrictions
- Set user access restrictions
- Remove user access restrictions