In source control management, the act of selectively pulling single changes from peer to peer is called "cherry-pick".
Questions tagged [cherry-pick]
448 questions
5
votes
1 answer
git cherry-pick without fetching remote branch
I am having a bit of a problem here, I want to cherry-pick a commit from a git repo that isn't locally present in my system.
For example : https://github.com/DespairFactor/N6/commit/ecea4ab6d3d8bb4122522398200f1cd2a06af6d5
A usual cherry-picking…

kuttu
- 55
- 5
5
votes
1 answer
Git rebase fails because: Commit xxxx is a merge but no -m option was given
I had a feature branch:
feature
with lets say 10 commits
then some time ago I started doing experiments on it, but wanted to preserve the current functionality just in case, so I started a new branch:
feature-experiment
and then did another 10…

Kaloyan Roussev
- 14,515
- 21
- 98
- 180
5
votes
0 answers
git cherry-pick without checkout?
From the accepted answer at Merge, update, and pull Git branches without using checkouts,
You cannot merge a branch B into branch A without checking out A first if it would result in a non-fast-forward merge. This is because a working copy is needed…

cp.engr
- 2,291
- 4
- 28
- 42
5
votes
2 answers
Git: How to list cherry-picked commits?
How to list commits that were cherry-picked in Git?
Let's suppose the following scenario:
cp = cherry-pick commit
cp1 cp2
master -----o------o------o-----o----o
\ / /
…

user2620348
- 309
- 4
- 15
5
votes
2 answers
Cherry-picking from git to svn (or, How to keep a project history in git and releases in svn)
I'm in a position where I'm the only one using git, everybody else is using svn. I've used 'git svn' to connect to the team svn and mostly it works just fine. Lately, I've started a project initially on my own, separate git repo and now I need to…

Jawa
- 2,336
- 6
- 34
- 39
5
votes
2 answers
Is it right to use git cherry-pick in these scenarios?
I apologize if my notation or terminology is wrong. I have been using git for a while on my personal projects and haven't had to deal with complicated merging scenarios. We started using it at work and are running into more complex scenarios. I am…

Vivin Paliath
- 94,126
- 40
- 223
- 295
5
votes
1 answer
Github pull request loaded with empty file changes
Ok, I've got a problem that I have no idea how to go about solving.
First, a bit of history:
I pulled from my upstream to bring in changes and merged them with the branch I was working in. At the time, I may have been using a console window with…

Joel Graff
- 239
- 6
- 14
5
votes
2 answers
How-to git backport (rebase/cherry-pick) an already merged branch
In our Git process, "master" is the integration branch for topic and fix branches for the current release cycle, but we also maintain a "stable" branch where we have to backport carefully some of our fixes already successfully tested on master.
All…

SRombauts
- 438
- 3
- 12
5
votes
2 answers
git cherry-pick merge deleting file
I'm trying to cherry-pick a commit in git, which adds a bunch of files, but also modifies a file that doesn't yet exist in my branch.
There is a conflict where the files to add are all staged, and the file that was changed in the commit but doesn't…

Solomon
- 6,145
- 3
- 25
- 34
5
votes
1 answer
git cherry-pick and merge by ignoring EOL changes
Recently in all of our repos, we added a git attribute file to all our repos. The idea was to force use the Unix EoL chars in all files. This created huge issues first day when you checkout to a new branch, it starts to show changes in the entire…

openSource
- 191
- 2
- 6
4
votes
1 answer
avoid repeat commits when cherry-pick from master to branch, then merge from branch back to master
I've got two branches in git, master/ and 1.7/. I backport some fixes from master/ into 1.7/, using cherry-pick. (I'm not using merge because I only want some of the changes.):
$ git checkout 1.7
$ git cherry-pick -x ..

Bill Keese
- 1,792
- 14
- 29
4
votes
7 answers
How to find out what commit a checked out file came from
When I check out a file with git checkout $commit $filename and I forget $commit but still remember $filename, how do I find out what $commit was?

j-pb
- 822
- 2
- 8
- 12
4
votes
1 answer
get rebase --interactive just shows 'noop' and merges all commits
dev branch is 5 commits ahead of master:
ce30cbd (HEAD -> dev, origin/dev) disabled debugs for libpid
678b1b2 split functionality to libpid and libaccel
6b3f9e2 direct logger test
f5d8841 dev build small changes
2a7c316 Revert "remove Makefile from…

pulse
- 303
- 4
- 18
4
votes
1 answer
Cherry-picking a range of commits doesn't work, but individual cherry-picks work
I'm having issues with cherry-picking a range of commits and keep having conflicts and can't figure out what's the problem. The conflicts shouldn't occur because the commits being cherry-picked add/modify code which isn't present in the receiving…

Ahmad
- 12,886
- 30
- 93
- 146
4
votes
1 answer
A way to create an orphan branch without having to remove files
When I create an orphan branch I have to remove all the files so the branch is completely empty. I want to be able to cherry-pick another commit on to the empty branch, but I get an error saying the file has been modified on one branch, but deleted…

VanAlfredo
- 193
- 1
- 2
- 6