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

Stash changes during conflict resolution

I am rebasing a complex feature to another branch using git cherry-pick. When trying to resolve conflicts in a big commit, I find out that I've missed some other commit that should be applied first. I can't stash the current state, apply the other…
Radim Vansa
  • 5,686
  • 2
  • 25
  • 40
1
vote
3 answers

How to override base during merge?

The problem See the image. I had a master branch. At commit A, I branched dev branch from it. At point B I synced dev with master, creating M1. At point C our team branched release branch from it. In future, I will need to merge dev back to release.…
Mikhail
  • 20,685
  • 7
  • 70
  • 146
1
vote
1 answer

how to revert one latest cherry-pick and retain others on local copy?

current state: I have a checkout version, on top of which, I have cherry picked various other commits (lets say 4-5 commits), which are some fixes. Now, I have to validate other fix without loosing my last working state. I therefore have cherry…
parasrish
  • 3,864
  • 26
  • 32
1
vote
2 answers

How to cherry pick uncommited changes in some files into a new branch?

Say I have branch and branch . In I have been doing several changes in file1, file2. But, also, I ended up doing refactoring on things that were apparently fixed, say in fileA, fileB. Now I would like to create a different branch that isolates…
fedorqui
  • 275,237
  • 103
  • 548
  • 598
1
vote
0 answers

Unable to pick specific commit using cherry-pick command

We have recently started using GIT for our corporate projects, one of the team member created a branch called ABC in his local Forked copy and sent me a PR in my corporate accounts ABC branchNow as the PR contains multiple commits i just want to…
Abbas
  • 4,948
  • 31
  • 95
  • 161
1
vote
2 answers

Git revert/cherry-pick to a commit beyond a merge

This is my situation: I am trying to place an exact copy of an earlier commit on top of my latest commit. However, I have already pushed to remote, so do not want to simply git reset --hard (or, I would be happy to do so if I could somehow then…
dean.
  • 1,657
  • 1
  • 13
  • 9
1
vote
0 answers

Git cherry-picking commits from one location to another on same branch

I am confronted with a challenging situation. The project I am working on has two git branches (master and develop). I have been working on a number of issues on the develop branch. All commits have been made directly on the develop branch…
Benjen
  • 2,835
  • 5
  • 28
  • 42
1
vote
2 answers

Cherry picking changes to specific files from a range of commits

I have a branch into which I accidentally merged other peoples changes a long time ago, and now hundreds of files show up on a pull request that are not mine. I would like to create a separate branch into which I would like to cherry-pick changes to…
Phonon
  • 12,549
  • 13
  • 64
  • 114
1
vote
1 answer

How to override cherry-pick conflicts

Is there any method by which we can override the cherry-pick conflicts? My scenario is: If user provides three changeids, and one file is common in all the three changeids. It will result in cherry-pick conflicts. So over-riding means, the script…
1
vote
0 answers

Cherry-pick with manual 'merge'

How can I use cherry-pick to get a commit from another branch, let git detect which files had change and then merge it manually (like with mergetool)? Is it possible?
Hamlett
  • 403
  • 6
  • 22
1
vote
0 answers

SVN - Cherry picking conflicts to resolve after branch reintegration

Following the methodology of short-lived feature branches, we have: - Trunk - Branch A (off Trunk) - Branch B (off Trunk) - There are nightly rebases from Trunk to both branches. Now, development in Branch A is complete. Branch A was re-integrated…
Slav
  • 27,057
  • 11
  • 80
  • 104
1
vote
1 answer

How to retrieve the right commit hash?

I had a master with a few commits, I moved back to the first commit, created a branch from there and used cherry-pick to apply one of the commits from the master branch. But due to some conflicts I got a message like: Automatic cherry-pick failed. …
NPS
  • 6,003
  • 11
  • 53
  • 90
1
vote
1 answer

git, is it possible to send pull request from master branch?

I guess my title does not self explanatory so let me explain little bit there. I forked a project from Github repo to my company repo. Then I forked the project from my company repo into my personal repo Then I cloned the project from my personal…
Hesam
  • 52,260
  • 74
  • 224
  • 365
1
vote
1 answer

Cherry pick specific commit and recover only deleted files?

I have a branch (Branch A) which added about 300 files, I then merged this into master. The merge broke master so I removed all 300 files and committed the removal of these files. I then proceeded to go back into Branch A and fix the override, but…
Jtanacredi
  • 53
  • 6
1
vote
0 answers

Git: merge branch into parent, excluding parent->branch merges?

So, I've got a scenario that looks about like the following: A----B----C----D (master) \ \ \ E-F--G--H-I (child) C and D in this case represents huge sets of changes, including lots of rearranging of directory trees. F and H are much…
Sbodd
  • 11,279
  • 6
  • 41
  • 42