执行命令git时rebase -i anotherBranch,将显示todo-list,所有提交都标记为pick.
有没有办法在默认情况下使用,比如编辑所有提交而不是pick?我知道在编辑器中使用replaceAll并不难,但我想知道默认情况下是否有办法执行此操作.
或者更好的是,打开默认文本编辑器显示标记为"编辑"的所有提交,直接执行rebase,就像所有提交都标记为"编辑"而不打开编辑器一样.
请参阅sequence.editor的git config文档,
git -c sequence.editor='sed -i s/pick/edit/' rebase -i anotherBranch
Run Code Online (Sandbox Code Playgroud)
要么
GIT_SEQUENCE_EDITOR='sed -i s/pick/edit/' git rebase -i anotherBranch
Run Code Online (Sandbox Code Playgroud)
是你想要的.
| 归档时间: |
|
| 查看次数: |
79 次 |
| 最近记录: |