I’m trying to write a powershell script that uses the git commit-tree command but it’s documentation says (http://schacon.github.com/git/git-commit-tree.html):
A commit comment is read from stdin. If a changelog entry is not
provided via “<” redirection, git commit-tree will just wait for one
to be entered and terminated with ^D.
Is writing to stdin like this possible in powershell somehow? Is there some work around?
PowerShell doesn’t support stdin redirection (using
<). It does support stdin piping e.g.:If your git command doesn’t work that way (perhaps uses normal stdin for something else), check out this blog post. It looks like they’re shelling out to cmd.exe for the stdin redirection support.