Git format-patch to be svn compatible?

前端 未结 8 2077
逝去的感伤
逝去的感伤 2020-12-07 08:19

Is there any way to get a patch created with git format-patch to be svn compatible so that I can submit it to an svn repo?

I\'m working off an svn repo on github and

相关标签:
8条回答
  • 2020-12-07 08:41

    I always have to Google this but the way I've found that works perfectly (for me) is:

    • Create the patch with git diff --no-prefix master..branch > somefile.diff, the master and branch part are optional, depends how you want to get your diffs.
    • Send it wherever and apply with patch -p0 < somefile.diff.

    It always seems to work fine for me and seems to be the simplest method that I've come across.

    0 讨论(0)
  • 2020-12-07 08:43

    Make sure your changes are committed and rebased on top of your local git branch, from git bash run:

    git show --pretty >> myChangesFile.patch

    0 讨论(0)
提交回复
热议问题