zoukankan      html  css  js  c++  java
  • git之commit改用第三方编辑器

    git commit -m "***"方式提交注释,有限制,可通过调用第三方编辑器来编辑更好的注释

    1 使用window自带的记事本

    git config --global core.editor notepad
    //或者对当前用户有效
    git config core.editor notepad

    可惜会存在中文乱码的问题!

    暂时没去找解决方案。推荐方法2

    2 用sublime来打开

    先下载安装sublime,然后在环境变量path中,把sublime的安装目录路径添加进去。

    如:***;C:Program FilesSublime Text 3;

    然后打开git bash,输入:

    git config core.editor sublime_text.exe

    重启下git bash。

    这时候就OK了。不过,需要注意,此时只需要输入:

    git commit

    git就会自动打开sublime,关闭sublime后,git就会正常提交代码了。

    可参考:

    http://www.tuicool.com/articles/fea6nq

    http://my.oschina.net/u/2004332/blog/411400

  • 相关阅读:
    神秘题目4
    神秘题目3
    神秘题目2
    AC自动机
    Fence Obstacle Course 题解
    Fractal Streets
    龟速乘
    快速幂
    Stall Reservation
    Sunscreen
  • 原文地址:https://www.cnblogs.com/simonbaker/p/5212463.html
Copyright © 2011-2022 走看看