フリー問題

CompTIA Linux+ のフリー問題 15 / 20 問目

問題文

A feature branch must be brought up to date with the main branch. The team requires that the resulting history show the feature commits as if they had been written on top of the current main. Which operation achieves that?

選択肢

  1. Merge main into the feature branch, which produces the same linear history without rewriting any commit, and the feature commits then appear after the main commits they build on.
  2. Rebase the feature branch onto main, which replays the feature commits on top of main and rewrites their identifiers.
  3. Cherry-pick each main commit onto the feature branch.
  4. Merge the feature branch into main with a fast-forward, which is possible in every case because a fast-forward simply moves the branch pointer and therefore always produces a linear history regardless of what happened on main.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。