what do I do when git cherry-pick works, but results are bogus?
So, the subject line basically says it. I do a git cherry-pick to MFC. It works, but the resultant file(s) are not correct. What do I do to fix this? (If the merge fails, then it's easy, but there doesn't seem to be an option on cherry-pick that forces it into "merge failed", so you can edit/add the file and then "git cherry-pick --continue".) Thanks for any help with this, rick
Re: what do I do when git cherry-pick works, but results are bogus?
On Wed, May 17, 2023 at 9:44 AM Rick Macklem wrote: > > So, the subject line basically says it. > I do a git cherry-pick to MFC. It works, but the resultant file(s) are not > correct. What do I do to fix this? > (If the merge fails, then it's easy, but there doesn't seem to be an option > on cherry-pick that forces it into "merge failed", so you can edit/add the > file > and then "git cherry-pick --continue".) > > Thanks for any help with this, rick After a cherry-pick that doesn't give you quite what you want, edit the file until it has the correct contents, then do "git commit --amend /path/to/file".
Re: what do I do when git cherry-pick works, but results are bogus?
On Wed, 17 May 2023, 17:44 Rick Macklem, wrote: > So, the subject line basically says it. > I do a git cherry-pick to MFC. It works, but the resultant file(s) are not > correct. What do I do to fix this? > (If the merge fails, then it's easy, but there doesn't seem to be an option > on cherry-pick that forces it into "merge failed", so you can edit/add > the file > and then "git cherry-pick --continue".) > If you're cherry-picking multiple commits then you can turn the problem into a rebase After the cherry-pick commits are created, then run git rebase -i Then change the `i` at the start of the line for the broken commit to `e` (edit) before saving the plan file