-
|
Hi all, There is a missing file in some package that I use in a composer project, so I try to create a patch for it. Normally, one can obtain the .diff file from git add -N path/to/file.xml
git diff path/to/file.xml > patch.diff
git reset --mixedIt seems to generate a valid .diff file, but after Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
When you |
Beta Was this translation helpful? Give feedback.
-
|
Your solution also seems to work, with a diff file that is similar to the one I got. However, when doing a I do find the file in Solved it by modifying the diff file and removing the Thanks for your help! |
Beta Was this translation helpful? Give feedback.
When you
git add, you've added the changes to git's staging area. When yougit diff, it only shows the differences for the files that are outside the staging area. If you only have that one file that you want to include in a patch, you cangit diff --cached path/to/file.xml > patch.diffto generate a patch from the staging area changes.