Patch

A bit like an OS patch.

Is useful for not letting people commit straight into the repo.

 

Allows for checks and balances.


• Allows for offline transport

• Adds in a signed-off-by field

• Works outside of Git repos


git format-patch HEAD~2

 

git reset --hard HEAD~2

 

git apply patches/* --index


git config user.name

git config user.name MrBoJangles

git config user.email "This email address is being protected from spambots. You need JavaScript enabled to view it."

git am ../patches/* --signoff

Note: you must set your username before running this.


git format-patch --stdout > unified.patch


git apply ...   is more low level

 

git am ... is higher level