首页 > 解决方案 > 我如何在 mac os 的 git 中制作 android studio 默认文本编辑器

问题描述

通常,我使用 android-studio 进行开发,并通过 mac os 中的终端使用 git。有时当我尝试合并分支时,终端打印这一行:
hint: Waiting for your editor to close the file...
然后打开 sublime text(这是我在 git 中当前的默认文本编辑器),向我显示合并命令的消息,并希望保存并关闭编辑器。如何将 android-studio 设置为 git 中的默认文本编辑器?

我这样做是为了将 sublime 设置为 git( ~/.gitconfig) 中的默认文本编辑器,但对于 android-studio 需要一个类似的命令:
editor = /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n -w

标签: gitmacosandroid-studio

解决方案


如果您在 android studio 中合并,则无法将其更改为您的 android studio。只需删除 sublime,它将由 android studio 处理。


推荐阅读