Why doesn't git picking cherries with more than one commit fails?

I am trying to combine two repositories, giving a flat (or alternating) story. I am doing this in accordance with https://stackoverflow.com/a/3126128/ under the "Rewrite Story:" section.

Two branches for merging are in "master" and "src / master". Then I write:

$ git checkout --orphan new-master $ git cherry-pick 9d325d6d 3f4c52ba error: a cherry-pick or revert is already in progress hint: try "git cherry-pick (--continue | --quit | --abort)" fatal: cherry-pick failed $ git cherry-pick 9d325d6d && git cherry-pick 3f4c52ba [new-master 10f0277] Initial revision. 7 files changed, 194 insertions(+) create mode 100644 __init__.py create mode 100644 manage.py create mode 100644 samples/__init__.py create mode 100644 samples/models.py create mode 100644 samples/views.py create mode 100644 settings.py create mode 100644 urls.py [new-master 08e083c] Fixed field name in SixChambersLayer. Added Sample.current_place. 1 file changed, 2 insertions(+), 1 deletion(-) 

So, why does the first cherry pick command fail, but does the split command work? I am using git 1.9.1.

+5
source share
1 answer

Try instead:

 git cherry-pick 9d325d6d^..3f4c52ba 

As I mentioned in " How to cherry pick a range of commits and merge into another branch :

In the " cherry-pick A..B " cherry-pick A..B , A must be older than B
If this is not the correct order, the team will fail.

If you want to select range B through D (inclusive), that will be B^..D

0
source

Source: https://habr.com/ru/post/1201020/


All Articles