Out first step is to create our differential (patch) file.
For those who are using PowerShell 5.1, first you will need to add the following parameter:
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
Export git stash changes (differences) to a text file.
git stash show "stash@{0}" -p > c:\temp\project.changes.patch
Copy the patch file to your target computer and run the following git
command:
git apply --ignore-space-change --ignore-whitespace ~/project.changes.patch
The --ignore-space-change
and --ignore-whitespace
are attributes that inform git
to ignore any formatting issues. You may still get some warnings like:
warning: squelched 402 whitespace errors
warning: 407 lines add whitespace errors.