【发布时间】:2015-07-03 09:00:56
【问题描述】:
当从命令行使用git rebase --interactive时,您会在终端窗口中获得提交列表,然后修改它们并保存,此时rebase过程开始,您可以使用git commit --amend和git rebase --continue重写历史
我正在尝试使用 Runtime.getRuntime().exec() 从 Java 自动重写整个历史记录,在另一个线程中我打开并编辑 .git/rebase-merge/git-rebase-todo 的 todo 文件
问题是代码在执行变基命令时停止
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("git rebase --continue --root $TIP");
因为它正在等待编辑器停止,所以如何解决这个问题并强制 rebase 进程启动?
【问题讨论】:
标签: java git rebase git-rebase