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
2
votes
1 answer

How to use GitX to cherry-pick a commit from master to another branch?

(Note: I do know how to do this using the command line git client; this question is on behalf of a command-line-phobic co-worker who I am introducing to git via the GitX GUI application on his Mac) I see that in GitX you can right-click on a commit…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
2
votes
2 answers

Why do rebased commit ids differ from cherry-picked ids?

This question stems from a nasty little merge conflict that I got myself into when I accidentally cherry-picked from my tracked branch into my tracking branch as opposed to rebasing it. Fixing it was quite easy, but still trying to wrap my head…
Brent Hronik
  • 2,357
  • 1
  • 27
  • 43
2
votes
1 answer

Incorrect Git Author Date on Commits Made via Android Studio

This issue really threw me off and my searches didn't turn up any helpful info so I'm posting this to help any other poor soul who runs into this. I was working on an Android repository today and made a number of commits and merges and all the…
Jon
  • 9,156
  • 9
  • 56
  • 73
2
votes
2 answers

How to pull a series of commits in git one at a time?

I have a series of commits in a fork that I want to apply or reject one at a time to my fork. Should I use git cherry-pick for this?
Chas. Owens
  • 64,182
  • 22
  • 135
  • 226
2
votes
2 answers

Why doesn't git cherry-pick override modification in current branch if their is different?

Look, I make a modification in a branch and then pick a commit from a similar branch, which does not have this modification. I wonder if modification must be rolled back or not. Initially, both A and B branches have a full copy of the same…
2
votes
1 answer

Undo local changes caused by failed git cherry-pick -n

I'm trying to get several commits from my dev branch into my uat branch using "git cherry-pick -n hash" and then use just one git commit/push to send them to uat. Let's suppose I have 5 commits I want, so I checkout and pull my uat branch and starts…
2
votes
1 answer

Understanding Git Cherry Pick conflict

We recently switched from SVN to GIT, and I'm having some trouble converting our previous workflow. Mostly everything works, but today I got a weird cherry-pick conflict. I'm able to resolve the conflict, but I would like to know where this came…
2
votes
2 answers

Git workflow to add the same functionality to diverged branches

[There seems to be a lot of similar information about related topics, but I still cannot find the answer.] Suppose we have two diverging branches: stable and master (aiming at becoming the next stable): ----> split --> fix 1 --> [stable] …
user319799
2
votes
1 answer

Rebase merge to have never happened

Due to (very odd) circumstances I now have a git repository with 2 roots. I would like to delete the merge that causes the second root to appear. Technically each of these "roots," is a commit with a parent of 0. I want to get rid of the merge that…
Snark
  • 1,664
  • 14
  • 27
2
votes
1 answer

How do I disable git cherry-pick's -e option?

Whenever I type "git cherry-pick --continue", it always brings up an editor that I have to "ctrl-x" out of. This seems to resemble "git cherry-pick"'s "-e" option, which appears to be automatically enabled. I would like to disable it. Alternatively,…
Darkfire
  • 21
  • 1
2
votes
3 answers

How to display the conflict resolution of a cherry-picked commit?

If a commit was cherry-picked and required a conflict to be resolved: commit 7b8e5c99a4a40ae788ad29e36b0d714f529b12eb Author: John Spray Date: Tue May 20 16:25:19 2014 +0100 ... Signed-off-by: John Spray (cherry picked from commit…
Loic Dachary
  • 1,034
  • 1
  • 10
  • 24
2
votes
1 answer

How to get list of commits that touched a given line of code (git)

I want to cherry pick from one branch to another, but they diverged strongly. How can I get list of commits that modified a given part of the file?
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
2
votes
0 answers

Cherry picks from gerrit overwritten by repo sync

Basically the title is my problem. I'm building Cyanogenmod while picking a few different things from their gerrit. I would like to save them permanently with my local source. I thought that git add . or git add -A would do the trick, but all my…
Tristan
  • 21
  • 2
2
votes
4 answers

Alternative to git cherry-pick when renamed files are common

I'd like to cherry-pick single commits from on branch to another. I expect file renames to be quite common but still want to be able to apply changes without human intervention. Since the built-in cherry-pick command doesn't seam to detect renames…
Onur
  • 5,017
  • 5
  • 38
  • 54
2
votes
1 answer

Hg + Eclipse - filtering changesets for transplant

The action I'm repeating over and over is transplanting my changes from default to production branch. However, each time this means a tedious and error prone task of hand picking the changesets I want to transplant between plethora of other…
vartec
  • 131,205
  • 36
  • 218
  • 244