3

So, I'm trying to apply an old commit by using cherry-pick, but seems more difficult than I thought.

This is what the BASH looks like...

--HEAD IS IN THE MASTER BRANCH-
git cherry-pick 6a0c632
error: could not apply 6a0c632...
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths> or "git rm <paths>'
hint: and commit the result with 'git commit'

I've been using Git for only 2 months and the only commands I've used are the basic ones: add, commit, push, pull...

artavia23
  • 53
  • 4
  • You need to clean up the conflict, see http://stackoverflow.com/questions/585844/merging-with-git-mergetool – martin Apr 29 '15 at 04:57
  • 1
    Well, you're on the right track so far. You'll have to [resolve the merge conflict](https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line/) next. – Greg Hewgill Apr 29 '15 at 04:57

2 Answers2

2

Step 1: Fix merge conflicts.

Step 2: Add fixed file(s).

git add <fixed_file>

Step 3. Continue the cherry-pick.

git cherry-pick --continue
Alex Pan
  • 4,135
  • 7
  • 31
  • 44
-1
error: could not apply zp39187... my message
When you have resolved this problem, run "git rebase --continue".

is an often reoccuring error.

A main reason of this happening is because (in my case) commit 'zp39187' is causing a conflict .

An often reoccurring 'solution' is to fix the conflict OR skip it by using:

git rebase --skip

The error however also seems to turn up while cherry-picking.

This link might be helpful: Add commits before root commit in Git?, since it looks very related.

I hope it's helpful in some way.. :)

Community
  • 1
  • 1
Answer_Bot
  • 35
  • 3