【发布时间】:2019-02-18 20:29:25
【问题描述】:
我已经 written a script 自动化 git rebase --interactive 以使用 GIT_SEQUENCE_EDITOR=sed ...s/pick/edit/... 编辑指定的提交
如何防止git rebase --interactive 打印出“有用”消息:
Stopped at 307c446... Add candy-text
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
这条消息被打印到 STDERR,我仍然想查看 rebase 命令本身和/或任何 {pre,post}-rebase 钩子的任何错误,所以 2>/dev/null 不是一个选项。
来自git config documentation,我试过了:
git -c advice.statusHints=false rebase --quiet --interactive --autostash --autosquash "$commit"~
我也尝试禁用 advice.resolveConflict 和 advise.detachedHead。
下面似乎没有任何有用的选项
rebase.*.
【问题讨论】:
标签: git git-rebase git-config git-interactive-rebase