I just ran into an simple but annoying issue. I wanted to create a patch from a git clone I made a modification on Windows with Git. I kept running into blank git patch files and I finally found out what I was doing wrong. Here are the steps I used to create a patch on Windows with Git:
1. Grabbed a fresh copy of the git clone
I did this because the current clone I had was full of other changes and I wanted to isolate the patch changes.
2. Modify your clone
3. Commit the changes
Run “git commit -a” – Make sure you put in a comment before you save the file.
4. Create the patch
Run “git format-patch -1″ – This will generate a *.patch file. Make sure you are in the correct folder, but don’t worry it will complain if you are not.
That’s it, I hope this helps someone.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.