Changes between Version 3 and Version 4 of GitRejectedPatch


Ignore:
Timestamp:
Mar 21, 2014, 5:21:01 PM (11 years ago)
Author:
Piero Campalani
Comment:

add Alan's workflow from GitPatchDoesNotApply

Legend:

Unmodified
Added
Removed
Modified
  • GitRejectedPatch

    v3 v4  
    151151----
    152152
    153 == 2A. Cherry-pick cleaning local master ==
     153=== 2A. Cherry-pick cleaning local master
    154154
    155155Assuming (use export to set them in bash):
     
    188188 * NOTE2: Still not know what to do if the dependent commits are from other authors (should not happen since the patch was not accepted) but I guess the method still applies as long as you add a patch taking care of such dependent commits.
    189189
     190
     191== 3. Brute force procedure
     192
     193The following procedure ensures resolution even if you did not keep the patch branch in your local repo or would have a complex rebase due to subsequent local patches.
     194Using a branch for each patch and rebasing it has to be preferred as a best workflow.
     195
     196   * clone the repository from scratch (optional, also a new branch should do)
     197   * apply the patch manually (with '''`--reject`''' option)
     198   * `git apply --reset patch_file`
     199   * fix manually the rejected files
     200   * You can find them by their extension (`.rej`)
     201   * then generate a new patch
     202
     203I think the only problem with this approach is that such patch won't be into your main working copy (existing repo), hence a clash might occur at next `git pull`.
     204
    190205== Final note ==
    191206Conflicts can always happen, it's not your fault.[[BR]]