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
0 answers

How to cherry-pick a HISTORY commit and apply forcedly to current branch

I wan to use a reverted history commit. Let's say this is my commit tree A -> A' -> B -> C -> D I made a commit A and reverted it by A'. Now, I am at D and I want my commit tree to be like A -> A' -> B -> C -> D -> A'', where A'' is as same as A. To…
PQMeng
  • 61
  • 4
1
vote
0 answers

Git Cherry pick creates a diff in target

Context: I have 2 target branches named R1 and R2 (Release 2). I did changes using F1.1 and merged it to R1. R1 was moved to Production. R2 was created after R1 was released. In a hurry, instead of creating a new branch, I continued in F1.1 and…
1
vote
1 answer

Is it correct to say that a git rebase is equivalent to a git cherry-pick of certain commits from the other direction?

I'm trying to tighten up my understanding (and communication) of git commands. Is it correct to say that git checkout A git rebase B is exactly equivalent to git checkout B git cherry-pick…
Andrew Cheong
  • 29,362
  • 15
  • 90
  • 145
1
vote
1 answer

When can I cherry-pick

I pose this scenario: I have two branches in the upstream repo: develop master My task is to create two pull requests, one against develop, and one against master. So i create two branches in my local: git checkout -b develop-local git checkout -b…
Nikita Jerschow
  • 836
  • 2
  • 11
  • 24
1
vote
1 answer

why does rebase always give merge conflicts?

I'm trying a git rebase to squash some commits down. However each time I have to manually resolve conflicts on what seems like every step. Basically every single commit I made shows as a conflict and I have to resolve it. Is it possible to use…
dcsan
  • 11,333
  • 15
  • 77
  • 118
1
vote
2 answers

How to check git commit is from cherry-pick, and from which one?

Can we know any git commit is from cherry-pick, and from which commit?
kevin
  • 11
  • 3
1
vote
1 answer

How to open GitHub PR for a proposed cherry-pick

GitHub pull requests are all about merging two branches together: The "remote" branch, containing new changes you want to merge. The "local" branch you want to merge into, which GitHub calls the "base" branch. Is there a way to create a branch…
Sam Salisbury
  • 1,066
  • 11
  • 19
1
vote
1 answer

Git auto-merging removed some information while cherry-picking

At work, I had to include a commit from a remote branch to my local branch. Because I did not want to merge yet, I cherry-picked the remote commit to my local branch. While cherry-picking, Git performed an auto-merge whithout prompting me for a…
apicoding
  • 13
  • 3
1
vote
1 answer

How to merge a single commit from one branch to another without changing the commit ID (SHA)

I acknowledge that there are similar questions that have been asked and answered here. Since none of them give me definite answers, I thought asking this question here again. Hope you don't reject this question. With that said: Scenario We have a…
Antony
  • 115
  • 1
  • 11
1
vote
0 answers

Why `git log --reverse --left-only --cherry-pick` not working as expected?

I am using this below command to see the list of commit hashes which have not been cherry picked from branch dev to main, since the main branch creation date from dev branch, git log --reverse --left-only --cherry-pick --oneline dev...main --since…
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
1
vote
1 answer

Git independent commits from fork to upstream

I have a common issue but I don't see a solid best practice for how to solve this. I am contributing to someone elses GitHub repo. I forked the latest Development branch to my repo. Now I want to apply pull requests one by one, making it very easy…
TonyG
  • 1,432
  • 12
  • 31
1
vote
2 answers

How do I pull/cherry-pick a gerrit commit/patch to a branch using a http link to the commit?

I'm trying to pull a particular gerrit commit/patch to a branch. I'm not too familiar with gerrit but it seems like for usual case there are things called "patch" which are like a group of commits lumped together. In most cases I see some steps…
John Doenut
  • 185
  • 3
  • 11
1
vote
1 answer

Why does cherry-pick not take all changes?

I have the following situation in my commit history: A1-...-A2 \ B1-B2-...-B3----------B4-B5 \ / C1-C2-C3 I then did (after git checkout A2 and a clean git status) git…
Christoph
  • 6,841
  • 4
  • 37
  • 89
1
vote
1 answer

Append custom line to cherry-picked commits in range

When cherry-picking a range of commits I can use -x to append the line "(cherry picked from commit [commit])" to each commit message. How do I customize this line to instead say "Backport of [commit] from master" ?
Oskar Persson
  • 6,605
  • 15
  • 63
  • 124
1
vote
1 answer

Can I cherry-pick back into git master/maser from a branch?

On git I have two branches, Items and Master both of which are several commits ahead of the local master/maser which is in sync with the remove master/master. I want to cherry-pick my branch master F and add it to the local master/master B ready to…
Frank
  • 207
  • 2
  • 6