美文网首页
git配置别名 快捷输入命令行

git配置别名 快捷输入命令行

作者: lxy_悦 | 来源:发表于2018-06-06 14:59 被阅读0次
    vim ~/.gitconfig
    

    打开git配置文件进行编辑

    [alias]
            s = status
            br = branch
            cm = commit
            st = stash
            a = add
            pl = pull
            ps = push
            rb = rebase
            ck = checkout
            ft = fetch
    

    保存退出

    在终端执行命令git s

    On branch master
    Your branch is up-to-date with 'origin/master'.
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)
    
            modified:   Makefile
            modified:   core/models.py
            modified:   requirements.txt
            modified:   web/settings_local.py
            modified:   web/urls.py
    

    执行成功,实际上执行的是git status

    相关文章

      网友评论

          本文标题:git配置别名 快捷输入命令行

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