how to apply patch by command in git code example Example 1: git patch apply git apply name-of-file.patch Example 2: gitapply patch file git apply <filename>