• 零维
    2018-12-11
    # 本节知识点

    ## 添加配置

    git config [--local | --global | --system] user.name 'Your name'
    git config [--local | --global | --system] user.email 'Your email'

    ## 查看配置

    git config --list [--local | --global | --system]

    ## 区别

    local:区域为本仓库
    global: 当前用户的所有仓库
    system: 本系统的所有用户
    展开

    作者回复: 👍

    
     57
  • Geek_fa9219
    2019-04-09
    添加最小配置:
    git config --local user.name 'lunzi'
    git config --local user.email 'lunzi@163.com'


    参数区别:
    git config --local ##只对某个仓库有效,切换到另外一个仓库失效
    git config --global ##当前用户的所有仓库有效,工作当中最常用
    git config --sysstem ##系统的所有用户,几乎不用

    查看配置:

    git config --list --local ##只能在仓库里面起作用, 普通路径git不管理
    git config --list --global
    git config --list --system

    local的在.git/config里面;global的在个人home目录下的.gitconfig里面;system应该在git安装目录的下
    展开
    
     11
  • 石头
    2018-12-16
    --local,--global,--system的配置文件在哪个位置,请问老师

    作者回复: local的在.git/config里面;global的在个人home目录下的.gitconfig里面;system应该在git安装目录的下。

    
     5
  • 灰
    2018-12-10
    录屏区域有点小,敲完之后回显两三行的都看不到。过一会儿敲几个回车才能看到

    作者回复: 打开后即全屏是否可以解决问题?

     1
     4
  • j-Dance
    2018-12-11
    已经配置的用户名和用户邮箱要删除的话该怎么操作呢???

    作者回复: 视频03里面“设置和清除”一页有,请用unset。我这里敲出来格式不对,你自己录入一下吧

     2
     3
  • Godaday 
    2019-03-19
    苏凌老师讲的很清楚,思路清晰
    
     2
  • 草裡菌
    2019-09-05
    1.初始化git管理
       对于已创建的文件夹,直接在文件夹目录下执行:git init
       创建并初始化git,可以执行:git init 文件夹名

    2.配置git用户信息
       配置level逐渐上升,生效priority逐渐下降:
       1.local,针对当前仓库的配置,git配置默认为local级别
          git config [--local] user.name 本仓库的用户名
          git config [--local] user.email 本仓库的用户邮箱
       2.global,针对当前系统用户的仓库
          git config --global user.name
          git config --global user.email
       3.system,针对当前操作系统所有用户的仓库。(该级别通常不用于配置用户信息)
          git config --system user.name
          git config --system user.email
    展开
    
     1
  • 冷锋
    2019-06-30
    老师,你的命令行用的什么字体?

    作者回复: 我看了一下,应该是苹果的Monaco

    
     1
  • 111
    2019-04-04
    老师GLOBAL,是针对当时用户所有仓库,是指系统当前登录用户吗

    作者回复: 对的。如果是 system 级别的,就是系统上所有用户了。local就是只限当前git仓库。

    
     1
  • 楚小风
    2019-01-15
    老师,global 可以配置多个用户吗

    作者回复: 当前账号对应一个配置。

    
     1
  • 我爱北京天安门
    2019-01-05
    一直浅度使用git和github。买了好好学习下
    
     1
  • 易风
    2018-12-24
    想起了班主任数学老师讲课的氛围,苏玲老师棒棒!👍

    作者回复: 谢谢夸奖。我比较爱表现

    
     1
  • 兰伯特 คิดถึง
    2019-11-16
    day01

    git config --global user.name '旺财'
    git config --global user.email 'wangcai@wangcai.com'

    🥰🥰
    展开
    
    
  • 丁丁历险记
    2019-10-01
    不讲linux 版的,差评。
    一顿操作后,终于装出来了, 中间要吐槽一下,咋就没个好点的yum 源。
    由于又穷又还想同时玩几台服务器,还想配置高,闲鱼后装了几台服务器在本地, 每次被网络卡崩。。
    一路安装下来,出啥问题排啥问题。 通常都是缺东西,或已安装的没卸干净。
    总算折腾出来了
    [root@localhost git]# git --version
    git version 2.9.5

    展开
    
    
  • 野马
    2019-08-05
    1.Windows下是这样做最小配置的吧?
    git config [--local | --global | --system] user.name "Your name"(双引号而不是单引号)
    git config [--local | --global | --system] user.email "Your email"(双引号而不是单引号)
    
    
  • 何伟
    2019-07-19
    配置的查看,也可以按照域来查看,比如global,但list里面都显示哪几类信息呢?
    
    
  • 何伟
    2019-07-19
    关于作用域的理解,一般是把选择设置为global,因为一台电脑的可能有很多仓库,而且这些仓库都是本人做修改的话,就都把名字设置为本人,会比较方便,是比较常用的操作。
    
    
  • jeffacode
    2019-06-13
    我觉得老师一定是位非常nice的工作伙伴哈哈

    作者回复: 同事们平日都很照顾我,从这点我反推算是吧。😄

    
    
  • 若则成
    2019-04-02
    windows安装到最后时出现unable to set system config "http.sslBackend":=" openssl":exit code 128 是什么问题,麻烦解答一下

    作者回复: 换个版本再试试看吧

    
    
  • 大海
    2019-03-11
    $ git config --list --system
    fatal: unable to read config file 'C:\Program Files\Git\mingw64/etc/gitconfig': No such file or directory
    请问老师,这个是啥问题?
    
    
我们在线,来聊聊吧