11
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Sublime Text 3のGitプラグインで、日本語コミットできるようにする

11
Last updated at Posted at 2015-10-29

Sublime Text3で、Gitのプラグインを利用するとSublime Textからコミットができて非常に便利です。

ただ、日本語ではコミットできません。

以下はその場合の対処法です。

  1. 以下のフォルダをコピー
/Users/"YOURNAME"/Library/Application Support/Sublime Text 3/Installed Packages/Git.sublime-package
  1. 以下のディレクトリ配下にはりつけ
/Users/"YOURNAME"/Library/Application Support/Sublime Text 3/Packages
  1. 名前を変更

Git.sublime-package -> Git.zip

  1. 同じディレクトリ内で解凍し、Git.zipは削除
  2. 解凍したGitディレクトリ内のCommit.py以外は全て削除
  3. Commit.pyを開き、124行目当たりを以下の通り変更
self.message_file = message_file
        # and actually commit
        with open(message_file.name, 'r', encoding='utf-8') as fp: #ここでUTF-8を指定
             self.run_command(['git', 'commit', '-F', '-', self.extra_options],
             self.commit_done, working_dir=self.working_dir, stdin=fp.read())
11
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?