You're working on a feature in a separate branch and want to include recent changes from the main branch. What Git strategy should you use?

  • Merge
  • Rebase
  • Cherry-pick
  • Reset
When working on a separate branch and wanting to include recent changes from the main branch, the recommended Git strategy is to rebase. Rebasing incorporates changes from one branch into another and results in a cleaner, linear project history. Merging is another option, but it can create unnecessary merge commits. Cherry-pick and reset are not typically used for this scenario.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *