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

GIT: automation to integrate commits between branches

My team has two GIT branches: 'main' branch which services our production environment 'update_1' branch which was forked out of main branch The idea is that 'main' is our current production branch. We only allow small bug fixes to be added to this…
Hampton Terry
  • 344
  • 1
  • 13
0
votes
1 answer

Remove specific file from specifc commit when 'git filter-branch' fails

I can't commit in my working directory anymore because there are some huge files in the repo that weren't included in gitignore, so they have been carried over and over in many commits/revisions. I've followed the instructions at…
microwth
  • 1,016
  • 1
  • 14
  • 27
0
votes
1 answer

Merge old branch to new branch GIT

I have two branches namely old branch(currently working branch) and new branch. I want to push the old branch commit changes to new branch. Here what i followed the steps:` Clone old branch and changed head and refs to new branch then executed git…
louis
  • 595
  • 3
  • 9
  • 24
0
votes
1 answer

How to merge specific commit id from different branch in same repo

I had two branches master & trunk. I have created one more branch in local using git checkout -b new_branch origin/master to take the master code in that branch. I have added committed some changes in this new branch & pushed as: git add --all git…
Akhil Gupta
  • 187
  • 3
  • 13
0
votes
1 answer

Recommendations to fix work overwritten in a bad merge

Consider the following situation: git configuration has rerere.enabled 1, enabling resolution recording and replay. The following commit history exists: B / \ A---C---E master \ \ / D D' Commit B was merged in master with --no-ff to…
James World
  • 29,019
  • 9
  • 86
  • 120
0
votes
1 answer

GIT cherry-pick giving error

I am trying to cherry-pick one of the commit using the sha to my branch but its giving error. Say I am on branch x, then I am running the command git cherry-pick as560aad0138.... in my terminal. The error I got is like this; error: Commit…
Sam
  • 1,623
  • 1
  • 19
  • 31
0
votes
0 answers

Cherry picking can result in some oddities in GitHub pull requests

I have a project in GitHub with a master, branch-A and branch-B. I have a file, foo.txt in the master and both branches. branch-A and branch-b are both derived directly from master. Master - foo.txt contains 'hello' Branch B - foo.txt was changed by…
Dave Brunkow
  • 352
  • 6
  • 20
0
votes
1 answer

Looking for git-workflow suggestions in handling an enormous PHP upgrade-project

For the past several months, I've been working on a massive upgrade project on an 11-year old application that consists of well over 3,500 individual files. At one point in time, the files were copied (they were being managed by SVN, then ...), and…
Mike Robinson
  • 8,490
  • 5
  • 28
  • 41
0
votes
1 answer

Cherry-pick commit from a single git to multiple git

I'm having a problem to move some commit from two projets, the details: - Project 1: Have a single git that regroupe many directories - Project 2: Have the same directories of project 1 but for every directory there is a separated git. The issue…
Optimmus
  • 55
  • 2
  • 3
  • 12
0
votes
0 answers

GIT Rebase in a new branch

I want to do a pull in GitHub and want to perform a GIT Rebase to clean up intermediate commits before issuing a pull request. I want to know if the following procedure is proper. While I'm pretty sure no one is building on top of my branch, for…
ShuberFu
  • 689
  • 3
  • 15
0
votes
1 answer

git strategy to merge different branches of same origin

I need understand how to do following in GIT. I have repository for one base project. I created a branch (kind of master) for new project. In the course of time, both the base project and new project has changed. Now I need to merge specific changes…
menem
  • 1
  • 3
0
votes
4 answers

git merge branch - dont want commits before the remote branch base

I have an issue with branching and merging in git. We have the following branches (which are our product, and are maintained in parallell as they all are installed and supported at…
0
votes
0 answers

git cherry picking showing previous revisions code in conflict

When using git cherry pick to merge revisions via commits we encounter the following issue of git showing other peoples code as part of the conflict resolution options. Let's say we have the following history in the develop branch A----B----1----2…
MilindaD
  • 7,533
  • 9
  • 43
  • 63
0
votes
0 answers

How to merge specific git commits from a branch to another?

Good day, Here's the situation: I have a master branch which is similar to production. I have a develop branch which contains all tested work and ready to be deployed in the next release. I develop new features on feature branches, based on the…
gael
  • 55
  • 1
  • 1
  • 8
0
votes
2 answers

Git cherry-pick and sha-1 value

In https://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project is example that shows how to cherry pick on a branch. In this example the sha-1 value of commit is used in full length? $ git cherry-pick…