当我命令 git rebase -i 时无法编辑 textedit

can't edit textedit when I command git rebase -i

我在本地练过git rebase -i。 我用这个命令。

git rebase -i HEAD~7

输出在这里。

pick 8631468 add test6.txttor to close the file... 
pick 10c300c test1-1
pick 93ebed2 test1-2
pick 3de0f6c test1-3
pick 44bc475 test1-4
pick 4432c1b test1-5
pick bb194e9 remove stash

# Rebase 97ac5cc..bb194e9 onto 97ac5cc (7 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
Successfully rebased and updated refs/heads/branch1.

我想编辑textedit。但 texteditor 被迫完成并且变基成功。我如何编辑文本?请帮忙

默认情况下,TextEdit 不会让命令行在继续之前等待您关闭文件。

您需要在 open 上使用 -W 使其等待应用程序关闭。 -n 将打开一个新的应用程序实例,这样退出应用程序就不会影响您打开的其他文档。

要使用 open -Wn 作为您的 Git 编辑器:

git config --global core.editor "open -Wn"

然后当 TextEdit 打开时,要在终端中继续,保存并关闭文档并退出 TextEdit。