# 如何将 EmEditor 设置为 Git 的默认文本编辑器？

1. 打开 **Git Bash** 并运行以下命令来设置默认编辑器。

    ```text
    git config --global core.editor "emeditor.exe -sp"
    ```
    - 查看配置变量 [`core.editor`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreeditor) 的文档。
1. 每当你使用提交命令时，你可以在 EmEditor 中编写你的提交信息。

![Git 提交消息](/media/2022/10/Screenshot-2022-10-16-094108.webp)
