[英]redirecting git command output to another
How can I redirect the command of a git command in "front" of another git command?如何在另一个 git 命令的“前面”重定向 git 命令的命令?
for exemple how could I make the following command work proprely:例如,我怎样才能使以下命令正常工作:
git diff --name-only | git commit -m
in the same way that I can redirect a ls to a cat -e就像我可以将 ls 重定向到 cat -e
ls | cat -e
Thanks you!谢谢!
What you need to do is this:你需要做的是:
git diff --name-only | git add . && git commit -m"$(git diff --cached --name-status)"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.