Skip to content

Commit

Permalink
Add git commit cherry pick command
Browse files Browse the repository at this point in the history
  • Loading branch information
arshadkazmi42 authored Jun 20, 2022
1 parent e666397 commit 1e0f15c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions commands/git/git-cherry-pick-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Cherry Pick a Commit

Copy a commit from one branch to another. Run the below command on the destination branch where you want your commit to be copied

`git cherry pick -x {{COMMIT_SHA}}`

- <b>COMMIT_SHA: </b> Commit ID of the commit, which needs to be copied

#### Example:

`git commit -x ef579afe0a4540dfced0576930cbf88568cb8a12`

This will copy the commit from source branch and add it in current branch

### Related

- [Commit Ammend](git-commit-amend.md)
- [Commit](git-commit.md)

0 comments on commit 1e0f15c

Please sign in to comment.