几个Git使用技巧

  • A+
所属分类:编程开发

Git免密登录

Http的免密登录

git使用http地址时,需要输入账号密码的。如果把配置于存到本地文件,因为store是明文存放,所以容易造成密码泄露。
可以执行以下命令,把凭证超时时间设置的很久。这样,只要凭证不过期,就不用重新输入密码了。

git config credential.helper 'cache --timeout=3600000'

设置Git关联的文本编辑器

不知道为什么,Linux默认用的是nano,不习惯。
原以为删除nano后会自动切换成vim。没想到直接报错了。

提示:等待您的编辑器关闭文件... fatal: cannot run /usr/bin/nano: 没有那个文件或目录
error: unable to start editor '/usr/bin/nano'

修改关联

git config --global core.editor vim
  • 版权声明:本站原创文章,于2019年6月15日16:45:39,由 发表,共 368 字,未经允许请勿转载。
  • 本文固定链接:几个Git使用技巧 | x64

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: