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

Cherry picking bug fixes correctly

So from my understanding cherry-picking a commit from one branch to another creates a completely new hash signature although the actual code changes are the same. I believe this is because the commit hash signature depends upon the branch name and…
myol
  • 8,857
  • 19
  • 82
  • 143
3
votes
2 answers

git cherry-pick: output resulting new commit sha

I am using git cherry-pick as part of a bash script. For reporting purposes, I would like to output the resulting commit SHA of this cherry-picking to the console. However, there seems to be no option in the cherry-pick command that would return the…
martin_wun
  • 1,599
  • 1
  • 15
  • 33
3
votes
1 answer

How to merge back cherry-picked commits in git?

I have 2 main branches master and development. I recently had to push a hotfix that are commits already merged to development, and to do so I cherry-picked commits from development, created a new hotfix branch, added another commit for the fix, and…
thisisdee
  • 878
  • 3
  • 16
  • 41
3
votes
1 answer

Overriding alternative to cherry-pick

There is a cherry-pick command in the git which allows me to copy some commit on top of the current. However, it does some conflict resolution, that I do not care about. What is alternative to cherry-pick which just copies picked commit over on top…
3
votes
1 answer

Git - 2 separate develop branches - cherrypicking or not?

I have 2 separate develop branches in Git, develop1 and develop2. These 2 branches have a common ancestor, commit C1 on master. These 2 branches contain 2 product releasecycles will will be joined in about 6 months (both merged into master). Before…
Bossk
  • 707
  • 8
  • 24
3
votes
2 answers

git cherry pick from remote master branch without other remote changes

Let's say I am working on my master in my own repository. My upstream for example is main-upstream. But I need one specific commit from another remote - special-upstream. I don't want another changes from it - I do not need all commits from that…
lapots
  • 12,553
  • 32
  • 121
  • 242
3
votes
2 answers

Git Rebase after Cherry-Pick

Let's say i have to branches: dd2e86 - 946992 - 9143a9 - a6fd86 - 5a6057 [master] \ 76cada - 62ecb3 - b886a0 [development] Now a commit from devel is required in the master branch, so i cherry-pick it: git checkout master git…
user3428756
  • 87
  • 2
  • 5
3
votes
1 answer

How to preserve original author on cherry-pick smartgit

I'm using smartgit to manage an SVN repo. We have 2 branches, trunk, and release. We are cherry-picking commits from trunk to release as they are ready. How do I set up smartgit to retain the author of the original commit on the cherry pick? Thank…
3
votes
1 answer

cherry-picking commit - is commit a snapshot or patch?

I have a question related to cherry-picking commits and conflicts. The 'Pro Git' book explains that commits are kind of snapshots and not patches/diffs. But cherry-picking commit may behave as it was a patch. Example below, in short: create 3…
MrCricket
  • 351
  • 1
  • 9
3
votes
2 answers

git rebase after git revert

While working on an open source project I encountered the following issue with git. I made a few changes, and sent a pull-request. The PR was accepted at first. However, my changes turned out to have some subtle bugs and the maintainer reverted my…
Lemming
  • 4,085
  • 3
  • 23
  • 36
3
votes
1 answer

How does one add patches from file X on branch1 to file X' on branch2 using Git - cherry-pick?

Esteemed Git users, These post's appear to answer my question, but either i'm too new to Git to grasp & execute them correctly, or they don't in fact answer my question: partly cherry-picking a commit with git How to git-cherry-pick only changes to…
kbrand
  • 98
  • 1
  • 6
3
votes
2 answers

Is cherry-picking the right way to backport and consolidate topic branch fixes?

Here's my scenario: Let's say I want to make a fix to an open source project on github. At a high level, I follow this workflow: fork the source project on github clone the fork locally create a topic branch off master make my fix (hand waving…
Andy Dennie
  • 6,012
  • 2
  • 32
  • 51
3
votes
1 answer

Are conflicts unavoidable when cherry picking a commit?

I am working on a code and I found my self in a situation similar to one explained on this blog. Basically, I have two versions of the code, that use completely different containers. This is done to compare the efficiency of the code when different…
tmaric
  • 5,347
  • 4
  • 42
  • 75
2
votes
1 answer

Are cherry pick merges appropriate in this scheme?

Imagine a git repository that is structured as follows: Main branch - development for the next major release is done here Release branches - development on patches for releases is done here Hotfix branches - hotfix branches are branched off from…
Eric
  • 5,842
  • 7
  • 42
  • 71
2
votes
2 answers

How to achieve a private branch in git that "floats" when merging with upstream?

I have a fork of another organization's repository. I'm at the the latest tag in the repo, which is not the head, and I've created a branch from that tag which will never be pushed upstream. That's why I consider the branch private. I've made…
Binary Phile
  • 2,538
  • 16
  • 16