Merges a single COMMIT to the specified branch

  • Cherry Pick Merges a single COMMIT

Specific operation: Git log Git checkout master // switch to the branch to merge git cherry-pick 62ecb3 // Copy the merge commit ID. 62ECB3 has been applied to the master (as a new commit). Git push origin master // commit to remote branch

  • Consecutive commit merges

Rebase is used to merge multiple. Again, imagine merging 76cada and 62ECB3 into master. Git checkout -b newbranch 62ecb3 git rebase — Onto master 76cada^ 76cada^ means merge from 76cada commit (as new commit). This completes the 76cada to 62ECB3 merge into master.

References: