In source control management, the act of selectively pulling single changes from peer to peer is called "cherry-pick".
Questions tagged [cherry-pick]
448 questions
0
votes
1 answer
Is it possible to cherry-pick a git commit without changing it?
Situation:
I have a repository with commits up to 1234
Someone forks it and adds a commit abcd and sends a PR
I like to rebase it instead of merge the branch as the branches are not diverged
I git cherry-pick the commit, but the new commit is now…

allo
- 3,955
- 8
- 40
- 71
0
votes
1 answer
How to bring commits form another repository branch
So I want to bring only commits from another repository branch to my local branch. How can I do that or can i do that using cherry-pick?
So i tried merging two branches but it brought unrelated histories as well

Ben_96
- 20
- 3
0
votes
1 answer
Merge all commits from a branch to another
At some point in our project we started a new development environment in which, in order to run properly, we were forced to make many changes in our code. Those changes are in a branch named "dev-test" that was created from "master".
This…

jolmos
- 1,565
- 13
- 25
0
votes
1 answer
Undo or revert a single, earlier GitLab cherry-pick commit?
I committed like 10 individual cherry-picked changes to my new release branch, and now after regression testing found that one of those commits in the middle may have broken something. I am prepared to release a new version of the code but exclude…

ShieldOfSalvation
- 1,297
- 16
- 32
0
votes
1 answer
How to cherry-pick changes to content extraced into a separate file to a version before the extraction?
Suppose I have in the past split out a smaller file from a larger one. The larger one is still in place:
large.txt --> large.txt
\-> excerpt.txt
Now, I've made a change to excerpt.txt that I'd like to cherry-pick back to a…

Marc Mutz - mmutz
- 24,485
- 12
- 80
- 90
0
votes
0 answers
github branch comparison show difference which are non-existing after cherry-pick
There are two branches A, B, C. A was first merged into C. Then Using github desktop, I "cherry-pick" a few commits from A to B.
However, on github website, using branch comparison on A and B, I still see differences related to those "cherry-picked"…

GoodToLearn
- 81
- 5
0
votes
1 answer
Remove two adjacent commits from history that cancel each other out. Why is this not simple?
I have history like that:
A <- B <- C <- D <- F
where F is newest.
B and C cancel each other out (really its 3 commits: merge feature to master, revert the merge commit, merge pr containing the reverting commit), so that:
git diff A D
shows no…

zaabson
- 151
- 12
0
votes
2 answers
How to grab a commit from another branch without a merge?
At face value, this seems like a textbook use case for cherry pick. Googling around, I find statements like:
Cherry picking in Git means to choose a commit from one branch and apply it onto another.
The command git cherry-pick commit applies the…

pierrecurie
- 111
- 4
0
votes
2 answers
Cherry-pick is not happening , shows the fatal :not a git repository how do I solve this
I want the latest changes from gerrit and need to pick the changes to putty. How can I pick Changes from gerrit to putty.
0
votes
0 answers
Cherry-pick multiple commits in smartGit but only first few commits are shown in the result of the target branch
I am using smartGit as the tool, say, I checked out branch A and need to bring some commits in branch B to branch A and those commits are not adjacent and could be spread apart in time of commits in branch B. I noticed that after selecting multiple…

Shawn Chen
- 95
- 10
0
votes
1 answer
In git, why do I have a conflict when cherry picking only latest commit of binary file?
Setup: I have a main branch where a binary file has been modified multiple times. Every commit that changed the binary file only had that one file in the commit (no other files were changed in any of those commits). I am using SourceTree GUI for all…

Inquisitor
- 49
- 8
0
votes
1 answer
Handling pull-requests across parallel forks sharing a parent
I have the following situation (repo had no activity in the last year):
repo _
|
|_ Fork_1
|_ Fork_2 ... commit_4 ... commit_5 ... commit_6
|
|_ Fork_my ... commit_12 ... commit_13...
I'd like to get…

jokob-sk
- 1
0
votes
1 answer
Git: how take modifications introduced by a bunch of commits into the branch without committing?
I have a range of commits of another whose modifications I would like to import in my current branch without creating the commit.
I have seen that the cherry-pick command has the option -n to avoid commits. However, when conflicts arise, I do not…

roschach
- 8,390
- 14
- 74
- 124
0
votes
1 answer
Force TailwindCSS cherry picking of classes to pick up certain classes
I'm currently using TailwindCSS in my Vue (with Vite) project and I want to use a dynamic width class depending on the size of a certain array.
const array = [1, 2, 3];
const width = computed(() => `w-1/${array.length}`);

Jeffrey
- 1,985
- 1
- 12
- 21
0
votes
1 answer
cherry pick multiple commits as one without going through each one git apply patch
I have branch A with a few commits I need to cherry-pick into branch B.
In the first cherry-picks I've added code that I've later removed in the last commits.
When I try to cherry pick them using first_commit^..last_commit it still cherry-picks the…

elad
- 13
- 1
- 3