git create patch with diff

Try a:

git apply --ignore-space-change --ignore-whitespace patch.diff

As mentioned in “git: patch does not apply”, this can be caused by:

  • the line endings differing between the local file system and the remote repo.
    User core.eol in .gitattributes file is a good approach (see “git force file encoding on commit”)
  • the execution bit (‘x‘).
    That can lead you to set git config core.filemode false, followed by a git reset --hard HEAD (make sure you don’t have uncommitted changes, or they would be lost).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)