What is the difference between "git merge --squash" and a regular "git merge" followed by squashing via interactive rebase?
Correct! Well done.
Incorrect.
The correct answer is A) "git merge --squash" stages all changes from the merged branch as a single change, but does NOT create a commit or record any merge relationship — you must commit manually, and the branch's individual history and parent link are not preserved at all
Correct Answer
"git merge --squash" stages all changes from the merged branch as a single change, but does NOT create a commit or record any merge relationship — you must commit manually, and the branch's individual history and parent link are not preserved at all
"--squash" is useful when you want the combined changes of a feature branch as a single commit on the target branch, with absolutely no trace of the source branch's history or that a merge occurred (no merge commit, no parent reference to the feature branch).