Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git format-patch

git format-patch -n HEAD 
where n is how many commits should be included in the patch

Apply the patch with the command:
git am < file.patch

> Applying patches using patch command:
patch -p1 < <patch-name>

Validate the patch without applying: 
patch -p1 --dry-run < <patch-name>
 
PREVIOUS NEXT
Tagged: #git
ADD COMMENT
Topic
Name
7+1 =