I have two files, x_original.txt
and x_updated.txt
.
I used the following command to obtain a patch file:
git diff --no-index x_original.txt x_updated.txt > fix_something.patch
I now want to apply this patch to a file called x.txt
.
The following is worth noting:
x.txt
is not in a git repo- the filenames
x_original.txt
andx_updated.txt
are included infix_something.patch
which makes no sense because these files won't exist when I'm applying the patch
What git command can I use to apply this patch? Or another utility if necessary? And what modifications should I make to the patch file?