git apply to apply a patch

  1. Create patch file by saving the output of git diff

git diff > changes.patch

  1. Apply the patch in another copy of the repo

git apply changes.patch