Questions tagged [cherry-pick]

In source control management, the act of selectively pulling single changes from peer to peer is called "cherry-pick".

448 questions
3
votes
1 answer

Trying to cherry-pick from a feature branch: No "cherries"?

(It's the first time I'm trying to use git's cherry picking, so maybe I misunderstood what it is or what it can do) While working on some new feature in a feature branch (for simplicity let's call it just next), I discovered some bugs in the current…
U. Windl
  • 3,480
  • 26
  • 54
3
votes
2 answers

Git: Can I "cherry-pick" a merge conflict resolution when the exact same conflict occurs again?

When I pull master into a branch, it may succeed, or it may conflict, depending on activity on both branches since they separated. When it conflicts, I will go through and manually resolve the conflict, eg using git mergetool, and then I'll commit…
User12321313
  • 141
  • 2
3
votes
2 answers

TFS Branching & Merging Strategies

I have a Team Project in TFS where tasks are submitted daily. I would like to work on each task independently and then merge it into the main line after testing. Currently there is a MAIN branch and a DEV branch which is a child of MAIN. Changes…
thiag0
  • 2,199
  • 5
  • 31
  • 51
3
votes
1 answer

Why is git cherry-pick conflict including changes from a previous commit

I have a staging branch where I made some commits for a feature, I need to make these commits from a master branch instead. I tried to checkout a branch from master branch using git checkout -b branch_name, then took the first commit that I wanted…
CJW
  • 332
  • 1
  • 14
3
votes
2 answers

MR for cherry picked commit through gitlab api

Is it possible to make MR for cherry picked commit through gitlab API? In the gitlab's doc there is only oppotunity to make MR from source branch to target branch.
user3441194
  • 57
  • 1
  • 5
3
votes
1 answer

Cherry-pick merge commit failing with empty commit

I have a couple of branches, and I want the changes from the second branch to appear in the first branch. It's probably best described with a diagram: X - Y - Z (branch-2) / \ A - B - C - D - E - F (master) \ G…
aidan
  • 9,310
  • 8
  • 68
  • 82
3
votes
1 answer

Cherry pick onto another branch in Eclipse git

In Eclipse using egit, is it possible to cherry pick a commit (in my case on the currently checked out branch, e.g. master) onto another branch B without first having to check out B? This would be quite a time saver... NB, this is explicitly about…
JRA_TLL
  • 1,186
  • 12
  • 23
3
votes
3 answers

Can't cherry pick one commit to a branch (bad object error)

OK, so our general git structure is that we have a master branch, one or more release branches and then feature branches. All the primary development happens in the feature branches but bug-fixes will sometimes get committed directly to the release…
kinar
  • 402
  • 1
  • 7
  • 22
3
votes
1 answer

Cherry Pick a Squashed Commit

I have two main branches, staging and master. I have a few commits and I have pushed those changes to a branch say xyz whose base branch is staging and have created a pull request for staging branch. All these commits has been squashed into a single…
Nidhin S G
  • 1,685
  • 2
  • 15
  • 45
3
votes
1 answer

How to check for empty cherry-picks in a bash script?

I have a bash script which runs following cherry-pick command: if git cherry-pick -x "$commitId"; then ammed_commit "$BRANCH" else #here I want to check if this resulted in empty commit fi I tried running the command again and…
Gaurav N
  • 405
  • 9
  • 19
3
votes
2 answers

When someone has cherry-picked from my git commits and made commits of their own, how do I merge?

Suppose I fork someone's git repo and make commits A, B, C, and D. The persom who I forked from then cherry-picks A and C, which therefore become A' and C'. He also makes commits X, Y, and Z of his own. So after all this, my branch has A B C D, and…
Ryan C. Thompson
  • 40,856
  • 28
  • 97
  • 159
3
votes
2 answers

Git workflow for partial merges?

I have a two branches dev and a. I need to merge feature a into dev, but my teammate has made certain features in one file that is not ready for merge. If I just merge and resolve using mine, git marks the changes in this file as invalid, and…
awiebe
  • 3,758
  • 4
  • 22
  • 33
3
votes
2 answers

Git commits that touch a subtree/subfolder

I have a monorepo project proj using subtrees in a folder sub under proj/sub. I have made tons of commits that touch both proj and sub. How do I publish the relevant changes to upstream sub effectively? Usually, I'd have to cherry-pick every commit…
rfabbri
  • 239
  • 2
  • 13
3
votes
1 answer

Cherry-pick from closed pull request without fork branch

I got a pull request that contains two commits, one of which I'd be willing to merge. However, the pull request has already been closed (not merged) and the corresponding branch deleted from the fork repo. Is there a way to cherry-pick that commit?…
Emil Laine
  • 41,598
  • 9
  • 101
  • 157
3
votes
1 answer

How to merge a git branch to multiple release branches

After a tfs migration (totally different concept of branches) I have to merge fixes to multiple release branches, but the branches are not identical, they are mostly similar, but different products(eg different branding, conn strings etc. ), so i…
MrKekson
  • 720
  • 6
  • 18