Automation, Orchestration, and Scripting
A developer has made five work-in-progress commits on the feature-login branch. The team wants these changes to appear on main as a single commit. Which procedure achieves this?
Show the answer
Correct answerD. Run git merge --squash feature-login on main, then git commit
git merge --squash stages the combined changes of the branch without creating a merge commit, so one git commit records them as a single commit. A --no-ff merge is tempting, but it keeps all five commits in main's history plus a merge commit.