nerdexam
Microsoft

GH-900 · Question #16

In GitHub, why is it recommended to deploy from your feature branch before merging into the main branch?

The correct answer is D. To ensure the changes are verified and validated in a production environment. Deploying from a feature branch to a production (or production-like) environment before merging into main is a best practice because it validates that the changes work correctly under real-world conditions. If issues are discovered post-merge on main, rolling back is more…

Modern Development

Question

In GitHub, why is it recommended to deploy from your feature branch before merging into the main branch?

Options

  • ATo directly deploy changes from the main branch without any intermediate testing
  • BTo speed up the process of merging changes into the main branch
  • CTo avoid the need for testing changes in production
  • DTo ensure the changes are verified and validated in a production environment

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    6% (1)
  • D
    88% (15)

Explanation

Deploying from a feature branch to a production (or production-like) environment before merging into main is a best practice because it validates that the changes work correctly under real-world conditions. If issues are discovered post-merge on main, rolling back is more complex and affects all users. This practice, sometimes called 'deploy then merge,' ensures the feature is verified in production before it becomes part of the canonical codebase.

Topics

#Feature branching#Deployment best practices#Pre-production validation#Continuous Delivery

Community Discussion

No community discussion yet for this question.

Full GH-900 Practice