How do we get this command to run on Powershell with out error : The '<' operator is reserved for future use.
C:\Users\Me\my-git-repo > git am < MyFix.patch The '<' operator is reserved for future use. At line:1 char:9 + git am < <<<< MyFix.patch + CategoryInfo : ParserError: (<:OperatorToken) ,.. + FullyQualifiedErrorId : RedirectionNotSupportedAnswer1:
Get-Content MyFix.patch | git am
cmd /c 'git am < MyFix.patch'
Both should work equally well. Windows Powershell simply doesn't support IO redirection with
< for now, so you either need to pipe the text to stdin using
Get-Content<sup></sup> sends the contents of MyFix.patch to stdout and
| feeds it along to
git am's stdin); alternatively, run the command through CMD.exe.
<sup> Alternatively, use the built-in alias