git apply patch code example Example 1: git patch apply git apply name-of-file.patch Example 2: gitapply patch file git apply <filename>