How could I create patch for staged files with Magit?
I tried "W p", when prompt "Format range or commit(master)", I am not sure what should I put there, I tried HEAD..master, but it doesn't create any patch.
I tried command line: "git diff --cached > my.patch" create what I expected.
How could I create the same patch with Magit?
While I haven't found a way to create a patch directly, you can certainly make a patch from any diff file!
From magit-diff, you can run W then s, or magit-patch-save to save the diff as a patch. You can customise your diff so that the patch matches just the changes you wish to share.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With