Export Git Stash as patches
Export Git Stash as patches
git stash show -u -p --binary stash@{0} > your_changes_name.patch
-u - for untracked files
-p - patch
-binary - for binary files (images)
stash@{0} - for fist stash (most fresh one)
now you can transfer the your_changes_name.patch file to the target machine/repository (e.g., via email, USB drive, or cloud storage). In the target repository:
Verify the patch (optional):
git apply --check your_changes_name.patch- Apply the patch:
git applyyour_changes_name.patch. You may use--ignore-whitespaceoptions if conflicts arise due to formatting differences. - The changes will appear in your working directory as unstaged modifications
Comments