我正在尝试让 git remote update
安静下来我的 Ruby 脚本中的命令。
我使用了 --quiet
其他 Git 命令的标志,例如 git checkout [branch_name]
.
出于某种原因,Git 在执行 git remote update
时没有该标志.有人知道其他方法吗?
我还尝试将输出输出到 /dev/null
喜欢git checkout [branch_name] < /dev/null
.
我愿意接受任何 Ruby 或命令行建议。
最佳答案
如果你想输出到/dev/null
,使用:
git checkout [branch_name] > /dev/null
或
git checkout [branch_name] &> /dev/null
按照您编写它的方式,您期待来自 /dev/null
的输入。
关于ruby - 安静的 git 远程更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21691508/