What is Git Cherry-pick?

What is Git Cherry-pick?

Watch the below Video about Git Cherry-pick Commit

GIT VIDEO

In Git, cherry-pick is a command that allows you to apply the changes introduced by a specific commit from one branch to another branch. It picks a single commit (or multiple specific commits) from one branch and applies it to your current working branch, without merging the entire branch history.

This is useful when you need a particular change from one branch but don't want to merge the entire branch.

Syntax

git cherry-pick <commit-hash>

<commit-hash>: The SHA hash of the commit you want to cherry-pick.


How Cherry-pick Works:

When you cherry-pick a commit, Git applies the changes made in that commit to the branch you're currently on. This creates a new commit in your current branch, containing the same changes but with a new commit hash.















P Shahensha

Associate Consultant at Conneqt

5 个月

Useful tips

回复

要查看或添加评论,请登录

Preethi Dovala的更多文章

  • Jenkins Tutorials - 2

    Jenkins Tutorials - 2

    TOPIC: Procedure to Change Jenkins Port to 8081 1. Connect to Your EC2 Instance: - Use SSH to connect to your EC2…

  • Jenkins Tutorials -1

    Jenkins Tutorials -1

    JENKINS VIDEO step-by-step guide for setting up Jenkins on an EC2 instance running Amazon Linux 2 and performing…

  • Kubernetes Commands (30 - 50)

    Kubernetes Commands (30 - 50)

    30. kubectl create serviceaccount my-serviceaccount - Output: The ServiceAccount is created.

  • Kubernetes Commands (13-29 )

    Kubernetes Commands (13-29 )

    13. kubectl expose deployment my-deployment --port=8080 --target-port=80 --type=LoadBalancer - Output: The deployment…

  • Kubernetes Commands - (1 - 12)

    Kubernetes Commands - (1 - 12)

    1. kubectl apply -f deployment.

    1 条评论
  • Kubernetes interview question and answers SCENARIO BASED

    Kubernetes interview question and answers SCENARIO BASED

    Scenario: You have a Kubernetes cluster with multiple worker nodes. One of the nodes becomes unresponsive and needs to…

  • Kubernetes interview question and answers for ADVANCED LEVEL

    Kubernetes interview question and answers for ADVANCED LEVEL

    1. Q: What are StatefulSets in Kubernetes, and when would you use them? A: StatefulSets are a Kubernetes controller…

社区洞察

其他会员也浏览了