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
1
vote
1 answer

Can cherry-picking from a branch cause trouble rebasing this branch to master

Context: I have an experimental branch crazy-idea where I did some wild things in a dedicated sub-dir madness/{src,docs}. A ton of commits, with notes, pictures, hacky scripts to create plots. Now that I have fully understood what I'm doing it's…
Maik Beckmann
  • 5,637
  • 1
  • 23
  • 18
1
vote
2 answers

git cherry-pick says nothing to commit

(note: this is not a duplicate question, see explanation below) I first checkout master as a detached branch: % git checkout --detach master HEAD is now at fff9e1e687 modserver/go: skip Spotlight automod aspect ratio check for cheerio vids Your…
1
vote
1 answer

Git cherry picking and commits

I'm trying to migrate parts of a feature branch into the main application. The feature branch was part of a prototype that had diverged from master a while back. Feature --> A --> B --> C --> D ---> E Master --> many changes on prototype -->…
1
vote
0 answers

How to merge a branch with some sort of "cherry-pick" strategy

I have a common git workflow, where you have two main branches: develop (for development) and master (for production). All other branches are created from these two and then merged back. Normally, when there is a bug on production, I create a branch…
1
vote
1 answer

TFS/TFVC merge selected changeset vs git cherry-pick between branches

We will be migrating our TFS/TFVC repository to Git. In TFVC we used to have a trunk based development with long lasting release maintenance branches. Bug fixes on release branches have to be merged back to the trunk. Sometimes smaller features have…
Scrontch
  • 3,275
  • 5
  • 30
  • 45
1
vote
2 answers

How to cherry-pick and merge only a subpath from a feature branch to master

I have an interesting problem (at least to me.) I have a master branch and a feature branch, which has been parted its way from master a while ago. Another team keeps updating the master branch and my team is only working on feature branch. The…
zimmerbimmer
  • 908
  • 7
  • 24
1
vote
2 answers

Git Rebase from a branch with Squashed merges

So say I have commits my dev branch, a b c I do a pull/merge request to the main branch, with squash merge option turned on. So the main branch now looks like, merge from 'dev' to 'main' squash: a, b, c But my source branch dev remains to be three…
Jin Huang
  • 11
  • 2
1
vote
1 answer

Git: Rebase to equal branch (with different history) conflicts, cherry-pick doesn't

I've found an interresting GIT usecase, in which cherry pick of the set of commits does not produce any conflict, but the rebase of the exactly the same commits does result in conflits. I'm aware it's some specific case, but I would like to…
martlin
  • 158
  • 2
  • 10
1
vote
0 answers

Hiding cherry picked commits in git log between 2 branches

Let's start with master branch m1 -> m2 -> m3 We create a branch now. Add b1 and b2, so my branch looks like this m1 -> m2 -> m3 -> b1 -> b2 Now master gets 2 more added m1 -> m2 -> m3 -> m4 -> m5 I cherry pick those 2 in my branch m1 -> m2 -> m3…
Hari Sundararajan
  • 608
  • 2
  • 8
  • 18
1
vote
1 answer

Cherry-pick branches from one Repo to another

I have two repositories Repo1 and Repo2. I have few new branches in Repo1 that should be moved to Repo2. How can I cherry-pick those branches(along with all the commits in it) and move it to second repo? So far I have done: git remote add repo2…
Prachi Sharma
  • 331
  • 1
  • 5
  • 14
1
vote
1 answer

Cherry-pick to multiple branches

I've been working on a project that has multiple environments (imagine two branches for tests, two for pre-production, and the other two for production, etc) using different database software. Sometimes the code is almost the same, but each one of…
Luann Sapucaia
  • 75
  • 2
  • 12
1
vote
1 answer

bring a change from gerrit to local workspace without recording commit id and message

I want to bring (like cherrypick) a change but I don't want to record commit message and/or change-id. Is there any way to do so? My command from a gerrit site for cherrypick the change looks as follows, which I ran in my project repository: git…
Dr. Essen
  • 603
  • 2
  • 9
  • 25
1
vote
2 answers

How to do cherry-pick only if no other commits update the files updated by the cherry-picked commit?

For example, consider the following directory: one two three And the directory has the following commit history and branches: dev master | | commit1 --> other commits -->…
Jingguo Yao
  • 7,320
  • 6
  • 50
  • 63
1
vote
1 answer

How to configure cherry-pick branch name?

When we are creating cherry-pick by built-in function of GitLab on merged MR, it gets name like cherry-pick-c2deb506. How to configure that name? I can't find this setting.
Андрей NOP
  • 203
  • 5
  • 16
1
vote
1 answer

How can I revert the master branch to an old commit and cherry-pick a commit that was in mater?

I have a change that I commited to my master branch. Other devs have also merged other feature branches into master after I made my commit. How would I revert master to a commit before mine and then merge only my change into master? Right now I was…
DannyD
  • 2,732
  • 16
  • 51
  • 73