git 常用 alias

本文地址: https://www.cnblogs.com/veinyin/p/14917033.html

 

以下配置仅适用于笔者,在此处记录备份用

1. vi ~/.gitconfig

2. 将下面别名 copy 进去后保存,lg = log --graph --all 很重要,可以查看所有分支的提交情况

[alias]

        st = status

        co = checkout


        ci = commit -m # msg 


        br = branch


        f = fetch -p


        po = push origin # branch name


        cb = checkout -b #  + branch name


        g = log --graph --all


        rb = rebase


        rbom = rebase origin/master


        p = push origin HEAD:master

 

22.10.13 更新

Windows 编辑 gitconfig 的命令是 git config --global -e

需要自己安装 vim

 

 

posted @ 2021-06-22 09:32  yuhui_yin  阅读(326)  评论(0编辑  收藏  举报