zoukankan      html  css  js  c++  java
  • git别名设置

    $ git config --global alias.co checkout

    $ git config --global alias.br branch

    $ git config --global alias.ci commit

    $ git config --global alias.st status

    $ git config --global alias.last 'log -1 HEAD'

    $ git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit"

     
    • 这意味着,当要输入 git commit 时,只需要输入 git ci。 随着你继续不断地使用 Git,可能也会经常使用其他命令,所以创建别名时不要犹豫。
    • 通常也会添加一个 last 命令,像这样:
        $ git config --global alias.last 'log -1 HEAD'

        这样,可以用git last命令轻松地看到最后一次提交

    •  个人习惯添加了一个git tree和 git hist(两个其实指向一个指令)
      •   

        $ git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit"

        $ git config --global alias.hist "log --graph --decorate --pretty=oneline --abbrev-commit"   

    
    
     直接修改用户下的.gitconfig文件也可以,其中alias一项为:
    [alias]
        co = checkout
        br = branch
        ci = commit
        st = status
        tree = log --graph --decorate --pretty=oneline --abbrev-commit
        hist = log --graph --decorate --pretty=oneline --abbrev-commit
        last = log -1 HEAD
    
    
  • 相关阅读:
    MvvmLight:Command
    TreeView控件
    visual studio背景色
    公共语言运行时
    颜色列表
    自定义控件【旋转按钮,带圆角的边框】
    Loding Animation
    ComboBox前台xaml绑定数据
    Blend一些属性图解
    找到视觉树的方法
  • 原文地址:https://www.cnblogs.com/Jacck/p/14296133.html
Copyright © 2011-2022 走看看