gitconfig常用命令

git config命令
1 用户信息
$ git config --global user.name "liyong" 
$ git config --global user.email liyong@example.com
2 命令简写
git config --global alias.st status:则git status可用git st代替
git config --global alias.co checkout:则git checkout可用git co代替
git config --global alias.ci commit:则git commit可用git ci代替
git config --global alias.br branch:则git branch可用git br代替
3 颜色配置
$ git config --global color.status auto
$ git config --global color.diff auto
$ git config --global color.branch auto
$ git config --global color.interactive auto

以上命令的设置结果,可从 ~/.gitconfig 查看,或者 git config --list 查看

评论

《“gitconfig常用命令”》 有 1 条评论

回复 gitflow常用命令 – 李勇的简历 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注