How to cherry pick from branch A to branch B on a system without history?

Farrukh Chishti picture Farrukh Chishti · Apr 1, 2015 · Viewed 20.4k times · Source

Suppose I have a new system with no git history and I take a fresh checkout of branch A. Branch A already has a commit C1 which I did yesterday from some other system. Now I want to cherry-pick this commit C1 in branch B. Issue:

  1. If I take checkout of branch A and go to commit C1 (in history in Git view) and click 'cherry pick', it says do you want to cherry pick in branch A? So, there is no discussion of branch B here.
  2. If I take checkout of branch B it will not show commit C1 at all.

Now, how do I cherry pick commit C1 of branch A into branch B? I am using Gerrit, GitBlit and EGit in eclipse.

Answer

Daniel Sokolowski picture Daniel Sokolowski · Jul 30, 2015

Qualatar comment is a little outdated, here is how to show all branches in 'Show History' in 'Version: Luna SR2 (4.4.2)' so that you can 'right click > Cherry Pick'.

how to see all commits in Eclipse IDE EGIT to cherry pick