Questão 2 — Simulado AWS Certified Data Engineer – Associate (DEA-C01) | Questões Atualizadas
Two developers are working on separate application releases. The developers have created feature branches named Branch A and Branch B by using a GitHub repository's master branch as the source. The developer for Branch A deployed code to the production system. The code for Branch B will merge into a master branch in the following week's scheduled application release. Which command should the developer for Branch B run before the developer raises a pull request to the master branch?
- A. git diff branchB mastergit commit -m
- B. git pull master
- C. git rebase master
- D. git fetch -b master
Resposta correta:
C
Explicação
Explanation: To ensure that Branch B is up to date with the latest changes in the master branch before submitting a pull request, the correct approach is to perform a git rebase. This command rewrites the commit history so that Branch B will be based on the latest changes in the master branch. git rebase master: This command moves the commits of Branch B to be based on top of the latest state of the master branch. It allows the developer to resolve any conflicts and create a clean history. Reference: Git Rebase Documentation Alternatives Considered: A (git diff): This will only show differences between Branch B and master but won't resolve conflicts or bring Branch B up to date. B (git pull master): Pulling the master branch directly does not offer the same clean history management as rebase. D (git fetch -b): This is an incorrect command. Reference: Git Rebase Best Practices
Quer todas as 289 questões por R$ 198,00?