GIT:【基础一】必要配置和命令

目录

一、Git安装

二、基础命令

        1.git config -l:git配置详细信息

        2.git config --system -l:本地git系统自动配置的信息

        3.git config --global -l:本地git用户自动配置的信息

        4.where git: windows查看git安装目录

        5.git各配置文件存放位置

        6.通过命令配置git的用户名密码


一、Git安装

        请自行百度,使用.exe安装。安装git时,自动配置了环境变量

二、基础命令

        右键 Git Bash here 打开命令窗口。

        1.git config -l:git配置详细信息

$ git config -l       # 执行的命令

# 以下是响应信息
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=E:/software/git/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=true
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
user.name=lvyingliang                        # 已经配置的用户的信息
user.email=lvyingliang@lansoft.com.cn        # 已经配置的用户的信息

        2.git config --system -l:本地git系统自动配置的信息

$ git config --system -l  # 执行命令

# 响应信息
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=E:/software/git/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=true
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master

        3.git config --global -l:本地git用户自动配置的信息

$ git config --global -l

user.name=lvyingliang
user.email=lvyingliang@lansoft.com.cn

        4.where git: windows查看git安装目录

        5.git各配置文件存放位置

                --system系统配置文件位置:Git目录/etc/gitconfig。文件内容同1.2响应内容

                --global用户配置文件位置:C:\Users\当前登录用户(lvxiaobu)\.gitconfig【可以通过操作用户的配置文件直接配置用户名密码】 。文件内容同1.3响应内容

        6.通过命令配置git的用户名密码

git config --global user.name "lvxiaobu"
git config --global user.email "lvxiaobu@qq.com"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值