'git am < MyFix.patch' command error in Powershell

三世轮回 提交于 2019-12-02 06:36:48
Derek Redfern

Use either:

Get-Content MyFix.patch | git am

or:

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[1] sends the contents of MyFix.patch to stdout and | feeds it along to git am's stdin); alternatively, run the command through CMD.exe.


[1] Alternatively, use the built-in alias type.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!