Sobes.tech
Junior — Middle

In which scenario will the change history structure be more branched: when using git rebase or git merge?

sobes.tech AI

Answer from AI

The structure of the change history will be more branched when using git merge.

Explanation:

  • git merge combines branches, preserving all commits and creating a new merge commit. This results in additional branches and merges in the history.
  • git rebase rewrites history by moving commits from one branch onto another, making the history more linear and clean, without additional merge commits.

Thus, if a clean and linear history is important, rebase is used, and if preserving all branches and merge context is important — merge.

In which scenario will the change history structure… - sobes.tech