Question 21 · 385 in bank
DRAG DROP - Drag and drop the steps from the left into the correct sequence on the right to describe how to use Git to maintain the current HEAD and revert back to a previous commit, while undoing all intermediate commits. Select and Place:
This is an interactive task on the real exam — a drag-and-drop, hotspot or ordering question. There is nothing to select here, so the answer is shown below for reference.
Show the answer figure
Answer: See figure below
Explanation
I agree with kayleen's opinion. If you do as blezzo's solution, you can see the message "nothing to commit" in 5 step. If I rewrite it according to Kylin’s opinion, it will as following. 1. git log 2. git reset --hard 56e05fced 3. git reset --soft HEAD@{1} 4. git status 5. git commit -m "Revert to 56e05fced commit" For verification, you can check while making two commits.
Source: Adapted from community discussion — JM_Lee









