美文网首页
git常用设置

git常用设置

作者: 马儿爱吃草 | 来源:发表于2019-03-27 18:24 被阅读0次

设置默认用户名和密码

git config --global user.name "xxxxxx"

git config --global user.email "xxxxxx"

换行符处理

1、(Windows系统)提交时自动地把行结束符CRLF转换成LF,而在签出代码时把LF转换成CRLF

git config --global core.autocrlf true

2、(Linux或Mac系统)使用LF作为行结束符,在提交时把CRLF转换成LF,签出时不转换

git config --global core.autocrlf input

这样会在Windows系统上的签出文件中保留CRLF,会在Mac和Linux系统上,包括仓库中保留LF

3、开发仅运行在Windows上的项目,可以设置false取消此功能,把回车符记录在库中

git config --global core.autocrlf false

缓存

缓存输入的用户名和密码

git config --global credential.helper wincred

清除缓存

清除掉缓存在git中的用户名和密码

git credential-manager uninstall

相关文章

  • Git命令行实用手册

    记录一下git常用操作 设置user的name和email 设置name: $ git config --glob...

  • 2016-06-24 阅读整理

    Git Git 基础命令Git 分支管理Git 分支合并Git 公钥提交Git 常用技巧Git 设置别名 Andr...

  • git常用命令

    git 常用命令git help 全局设置 git config --global user.name "John...

  • git常用设置

    设置默认用户名和密码 换行符处理 1、(Windows系统)提交时自动地把行结束符CRLF转换成LF,而在签出代码...

  • git常用设置

    修改用户名 git config --global user.name "username" 修改邮箱地址 git...

  • Git实用配置

    合理地配置 Git 可以提高开发效率,下面是本人常用的 Git 设置。 1.快速设置vi ~/.gitconfig...

  • GIT使用详解

    Git常用命令 git辅助命令 git config git config 命令用于获取并设置存储库或全局选项。这...

  • Git学习

    Git常用命令创建代码仓库git config --global user.name "xxx" 设置用户名git...

  • Git的学习使用笔记

    一. 重要的参考资料 git干货系列 二. 常用命令汇总 git初始设置 git config --global ...

  • git常用命令

    主要是是一些常用的Git命令 Git Commands 开始使用git 设置用户名git config --glo...

网友评论

      本文标题:git常用设置

      本文链接:https://www.haomeiwen.com/subject/tvstbqtx.html