Error while applying a patch in git

后端 未结 3 687
天涯浪人
天涯浪人 2021-01-31 11:25

I have a shallow clone, on which i made three commits. Here is the log:

$ git log --oneline --graph --decorate --all
* d3456fd (HEAD, maste

3条回答
  •  無奈伤痛
    2021-01-31 12:02

    Note that one rationale for having to ignore whitespace was (June 2010):

    What it does is enable the GMail -> download -> git-am workflow.
    GMail (and doubtless countless other) E-Mail providers introduce whitespace at the beginning of raw E-Mail messages, while otherwise leaving them intact.

    As mentioned in "git am/format-patch: control format of line endings", you can try a:

     git am --keep-cr
    

    That wouldn't require you to ignore whitespace (warning only).

    The OP maxmelbin confirms in the comments that the following works:

     git am -3 --keep-cr --committer-date-is-author-date /c/temp/git/format_since_origin.patch
    

提交回复
热议问题