Last Updated: 2021-05-15
Say you have some changes that aren't committed and you want to merge in some
git stash is the normal way to persist these changes prior to
merging, but it can be a bit clunky. Here's another way:
git diff > changes.patch
git apply changes.patch
Another use-case of patches is to move git changes around between two repos when they are not connected via internet. Just put the patches on a USB stick.