GIT ---- GIT命令行简写配置

配置文件种类

  1. /etc/gitconfig:包含了适用于系统所有用户和所有项目的值 --system【查看 --system 配置项】
git config --system -l

在这里插入图片描述

  1. ~/.gitconfig:只适用于当前登录用户的配置 --global【查看 --global 配置项】
git config --global -l

在这里插入图片描述

  1. 位于git项目目录中的.git/config:适用于特定git项目的配置–local【查看 --local 配置项】
git config --local -l

在这里插入图片描述

配置 --global

  1. 常用命令简写配置
git config --global alias.st status
git config --global alias.pl pull
git config --global alias.ps push
git config --global alias.ci commit
git config --global alias.lg log
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.mg merge
  1. 直接修改配置文件
    2.1 查找配置文件位置

    git config --global -e
    

    在这里插入图片描述

    2.2 打开配置文件修改

    [alias]
        co = checkout
        ci = commit
        st = status
        pl = pull
        ps = push
        df = diff
        lg = log
        cp = cherry-pick
        ca = commit -a
    	br = branch
    	mg = merge
    

执行简写命令效果

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Rattenking

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值