美文网首页
Git 命令简化配置(mac)

Git 命令简化配置(mac)

作者: 秋天de童话 | 来源:发表于2019-06-11 14:51 被阅读0次

Git 命令简化配置(mac)

git 添加别名的方式,打开~/.gitconfig文件在其末尾添加:
在命令行输入以下命令:
1、进到根目录
cd ~/
2、打开.gitconfig,
vi ~/.gitconfig

a = add
b = branch
c = commit
d = diff
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset | %C(bold)%an' --abbrev-commit --date=relative
r = reset
aa = add .
ba = branch -a
ca = commit -a
cc = commit -a -m
cl = clone
cm = commit -m
co = checkout
cp = cherry-pick
nb = checkout -b
pl = pull
ps = push origin master
st = status

单独设置某个快捷键

git config --global alias.st status

相关文章

  • Git 命令简化配置(mac)

    Git 命令简化配置(mac) git 添加别名的方式,打开~/.gitconfig文件在其末尾添加:在命令行输入...

  • Git 命令简化配置(mac)

    Git 命令简化配置(mac) git 添加别名的方式,打开~/.gitconfig文件在其末尾添加:在命令行输入...

  • Git 命令简化配置(mac)

    git 添加别名的方式,打开~/.gitconfig文件在其末尾添加:在命令行输入以下命令:1、进到根目录cd ...

  • git 命令简化配置(mac版)

    cd ~vim .gitconfig 添加: [alias] co = checkout ci = commi...

  • Git 安装

    安装git mac安装git 配置Git 配置Git的用户名跟邮箱, 下面的命令 表示配置home目录下的设置 配...

  • Git常用命令总结

    git config   git config命令的作用是配置git的相关信息。 配置全局的用户名和邮箱,mac下...

  • git基本命令

    git config git config命令的作用是配置git的相关信息。 配置全局的用户名和邮箱,mac下可通...

  • Git技巧-别名

    通过使用别名配置,可以简化命令操作:别名设置范例: 别名设置后git co 等同于 git checkoutgit...

  • 好用的git命令缩写

    以下命令可以简化常用的git命令,比如可以使用 git co 代替 git checkout

  • git config

    git 配置 ,简化指令 git config -l git status --> git stgit confi...

网友评论

      本文标题:Git 命令简化配置(mac)

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