将Git默认编辑器更改为vim
程序员文章站
2022-03-11 09:13:52
...
将Git默认编辑器更改为vim
查看Git逻辑变量
$ git var -l
user.name=j
user.email=[email protected]
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=[email protected]:j/la.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
GIT_COMMITTER_IDENT=j <[email protected]> 1000000004 +0800
GIT_AUTHOR_IDENT=j <[email protected]> 1000000004 +0800
GIT_EDITOR=editor
GIT_PAGER=pager
将当前Git默认编辑器更改为vim
$ git config core.editor vim
将全局Git默认编辑器更改为vim
$ git config --global core.editor vim
再次查看Git逻辑变量
$ git var -l
user.name=j
user.email=[email protected]
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=[email protected]:j/la.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
GIT_COMMITTER_IDENT=j <[email protected]> 1000000004 +0800
GIT_AUTHOR_IDENT=j <[email protected]> 1000000004 +0800
GIT_EDITOR=vim
GIT_PAGER=pager
上一篇: adobe是什么?