フリー問題

Linux Foundation Certified IT Associate のフリー問題 17 / 20 問目

問題文

A developer needs to undo a change that has already been pushed to a branch that colleagues have pulled. Which approach keeps the shared history intact?

選択肢

  1. Delete the branch and recreate it from an earlier point, so that the unwanted commit is gone and colleagues pull the corrected line.
  2. Record a new commit that reverses the effect of the earlier one, leaving the existing commits in place.
  3. Edit the earlier commit's message to note the mistake, so that anyone reading the history learns that the change was withdrawn.
  4. Move the branch pointer back to the commit before the mistake and push the result, because the shared branch then matches the state everyone wants and colleagues can simply pull again to pick up the corrected history.

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

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