A developer is working on a feature for a new application. The changes in the existing branch named 'feat00304' must be integrated into a single commit with the current working primary branch named 'prodapp411926287'. Which git command must be used?
To integrate changes from an existing branch named 'feat00304' into a single commit with the current working primary branch 'prodapp411926287', the git merge --squash command must be used. This command squashes all commits from the feature branch into a single commit before merging.
A. git rebase --merge feat00304 - Incorrect. This command does not perform a squash merge. B. git merge --squash feat00304 - Correct. This command squashes all commits from 'feat00304' into a single commit and then merges it. C. git push --rebase feat00304 - Incorrect. This command is used for pushing changes and rebasing, not for squashing commits. D. git checkout --squash feat00304 - Incorrect. This command is invalid.
References:
Git Merge Squash
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit