не могу редактировать textedit, когда я командую git rebase -i - PullRequest
0 голосов
/ 23 февраля 2020

Я практиковал 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. но текстедитор вынужден завершить sh, и перебазировка прошла успешно. как я могу редактировать текст? пожалуйста, помогите.

1 Ответ

0 голосов
/ 24 февраля 2020

TextEdit по умолчанию не заставляет командную строку ждать, пока вы закроете файл, прежде чем продолжить.

Вам нужно будет использовать -W на open, чтобы заставить его ждать, пока приложение близко. -n откроет новый экземпляр приложения, так что выход из приложения не повлияет на другие открытые документы.

Для использования open -Wn в качестве редактора Git:

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

Затем, когда откроется TextEdit, чтобы продолжить в терминале, сохраните и закройте документ и выйдите из TextEdit.

...