Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Applying git patches from a mailing list

I need to apply a patch(from a mailing list) into a local git repository

The patch in the mailing list has a cover message and a brief information about it. I can copy paste the appropriate patch text into a file and use it as a patch. If possible, could someone please suggest a better alternative?

like image 513
codey modey Avatar asked Sep 30 '22 07:09

codey modey


1 Answers

You have the choice of git apply and git am with git mailinfo.

The git mailinfo command will process the email message and will separate the patch from the log, but usually you can simply use git am. Also please note the --scissors,

--scissors

Remove everything in body before a scissors line. A line that mainly consists of scissors (either ">8" or "8<") and perforation (dash "-") marks is called a scissors line, and is used to request the reader to cut the message at that line. If such a line appears in the body of the message before the patch, everything before it (including the scissors line itself) is ignored when this option is used.

like image 120
mockinterface Avatar answered Oct 08 '22 17:10

mockinterface