No in Question #62 from Topic 7 you do a rebase of the master branch to the experimentation brach, in that case the feature became the new master, and also here.
Is not an usual scenario, but could happen that you want to override the master with the commits of feature.
answer is A
Opción más correcta: D. git merge --allow-unrelated-histories
Porque el caso indica indirectamente que:
POC tiene commits independientes.
Se quiere que esos commits reemplacen el historial de la rama principal.
Entonces, necesitas un comando que permita fusionar dos ramas sin historia común. Eso es exactamente lo que hace:
git merge POC --allow-unrelated-histories
Este comando fusiona todo el historial de POC al branch por defecto, reemplazando su contenido si resuelves bien los conflictos.
As the commit history of the POC branch must be used instead of that of the default branch, you need to checkout the default branch, then rebase it on the poc branch.
A is the answer.
https://learn.microsoft.com/en-us/azure/devops/repos/git/pulling?view=azure-devops&tabs=visual-studio-2022#rebase
Git rebase resequences the commit history of the target branch so that it contains all source branch commits, followed by all target branch commits since the last common commit. Another way to view it is that a Git rebase replays the changes in your target branch on top of the source branch history. If any source branch change conflicts with any target branch change, then Git will prompt you to resolve the merge conflict. Git rebase doesn't create a merge commit.
The correct answer is B. git merge --squash
When using the --squash option, Git will take all the commits in the POC branch and combine them into a single commit, effectively replacing the history of the default branch with the commit history of the POC branch.
It is important to note that this command will not move the POC branch but it will create a new commit in the default branch with all the changes from the POC branch, and the POC branch will remain unchanged.
upvoted 4 times
...
...
This section is not available anymore. Please use the main Exam Page.AZ-400 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
syu31svc
Highly Voted 2 years, 5 months agowarchoon
1 year, 11 months agodottLorenz
1 year, 11 months agoFadoua24
Most Recent 1 week, 3 days agohardinxcore
1 year agovsvaid
1 year, 1 month agoPamban
1 year, 7 months agozellck
1 year, 7 months agozellck
1 year, 7 months agolknr
1 year, 11 months agopetitbilly
1 year, 11 months agodottLorenz
1 year, 12 months agomrg998
2 years agomrg998
2 years ago