git am: Patch format detection failed
Use below command: patch -p1 < patch_file_name.patch
- You will be asked to specify "File to patch", mention complete path /
- Assume -R [n]: n
- Apply anyway? [n]: y
Do for all files present in you patch.
- If any merge conflict occurs then check the conflict in ".rej" file which has been generated and resolve & apply those changes.
- do "git add " and "commit" your changes.
Patch format detection failed.
probably means you're using the wrong command: use git apply
instead of git am
or the other way around.
See What is the difference between git am and git apply? for more on the difference between the 2.