Monday, January 23, 2017

Difference between “checkout” & “cherry-pick”

Clone:

  1. clone is for fetching repositories you don't have

Checkout:
  1. Switching to a specific branch or a specific commit.
  2. checkout is for switching between branches in a repository you already have.

Cherry-Pick:
  1. Taking / picking only the changes of a specific commit on to the working tree. The changes will be merged with the code on working tree.

Pull:
  1. Fetches the changes AND merges them into the local branch of the same name.


Difference between “checkout” & “cherry-pick”
• “checkout” fetch the code and head is moved to that commit. It does not merge with the
existing headed code.

• “cherry-pick” takes only the change of that commit and merge with currently headed code.

No comments:

Post a Comment