4

私の現在の開発環境ではgit rebase、インタラクティブ モード ( ) で実行すると、リベースの処理方法を伝える方法として、テキスト ファイルを変更するように求め--interactiveられることがよくあります。vivi は、git によって決定されたと思われる方法でこれらのファイルを強調表示します。(このコンテキストで git にとって特別な意味を持つ「pick」、「squash」などのキーワードは、異なる色で強調表示されます。)

私は vi よりも emacs を使用する方が好きなので、代わりに emacs を開くように git を構成しました ( git config --global core.editor "emacs -nw")。残念ながら、emacs は vi のように git によって提供されたファイルを強調表示しません。どうすればこれを修正できますか?


編集:

インタラクティブな git rebase によって生成されるファイルに慣れていない場合のために、以下に例を示します。

pick f218f23 A major overhaul of the cucumber integration tests
pick 601d8f4 A bunch of minor bug fixes and refactoring
pick 1adc507 Adding and updating documentation for various files.

# Rebase ff8cb22..1adc507 onto ff8cb22
#
# Commands:
#  p, pick = use commit
#  r, reword = use commit, but edit the commit message
#  e, edit = use commit, but stop for amending
#  s, squash = use commit, but meld into previous commit
#  f, fixup = like "squash", but discard this commit's log message
#  x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
c:\my_project\.git\rebase-merge\git-rebase-todo [unix] (15:50 26/10/2012)

この例では、キーワード「pick」、リビジョン ハッシュ、コミットの説明、およびコメントがすべて異なる色で強調表示されます。

4

2 に答える 2

3

すでにどこかに(たとえばmagitの一部として)そのモードがあるか、そうでなければ誰かがそれを書く必要があります(サンプルコンテンツと種類に関するヒントを見せれば、かなり簡単なはずです)彼らが持っているファイル名の)。

于 2012-10-26T20:49:18.120 に答える
0

http://bogolisk.github.com/egg/egg-log-rebase.png

Eggには、インタラクティブなリベースのサポートが組み込まれています。最初にDAGでコミットを選択してから、インタラクティブなリベース開始します。

--http ://bogolisk.github.com/egg/

于 2012-11-09T18:52:03.540 に答える