1.默认的编辑器:core.editor
  git config --global core.editor emacs

2.默认提交模版:commit.template
  假设你创建了一个叫 ~/.gitmessage.txt 的模板文件,类似这样:
    subject line
    what happened
    [ticket: X]
  要想让 Git 把它作为运行 git commit 时显示在你的编辑器中的默认信息, 如下设置 commit.template
    git config --global commit.template ~/.gitmessage.txt

 

所有的配置项可在https://git-scm.com/docs/git-config.html找到

相关文章:

  • 2021-08-31
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2021-12-06
  • 2021-12-16
相关资源
相似解决方案