How does cherry-picking affect the commit history in Git?

  • It creates a new branch with the cherry-picked commit.
  • It rewrites the commit history by applying the changes of the selected commit.
  • It deletes the cherry-picked commit from the history.
  • It merges the cherry-picked commit into the current branch.
Cherry-picking involves selecting a specific commit and applying its changes onto the current branch. It essentially rewrites the commit history, maintaining the selected changes without merging the entire branch. This can be useful for incorporating specific features or bug fixes from one branch to another without merging the entire commit history.
Add your answer
Loading...

Leave a comment

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