Skip to content

How to generate patch file for non-existing file #591

Closed Answered by cweagans
memen45 asked this question in Q&A
Discussion options

You must be logged in to vote

When you git add, you've added the changes to git's staging area. When you git 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 can git diff --cached path/to/file.xml > patch.diff to generate a patch from the staging area changes.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cweagans
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants