美文网首页
git配置 alias

git配置 alias

作者: 记忆是条狗 | 来源:发表于2020-04-17 15:22 被阅读0次

命令行设置git的配置 alias

git config --global alias.st status #代表输入git st就代表git status

配置 ~/.gitconfig 文件

        pl = pull
        st = status
        ci = commit
        co = checkout
        br = branch
        df = diff
        unstage = reset HEAD --
        lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Cres    et' --abbrev-commit
        last = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Cr    eset' --abbrev-commit -1 HEAD
  [core]
    excludesfile = /Users/mac/.gitignore_global
    editor = /usr/local/bin/vim
  [push]
        default = simple
  [difftool "sourcetree"]
    cmd = opendiff \"$LOCAL\" \"$REMOTE\"
    path =
  [mergetool "sourcetree"]
    cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
    trustExitCode = true

相关文章

  • Git 2022-04-27

    使用 alias 这是我的 zshrc 的 alias 配置: alias gst='git status -sb...

  • git 使用

    git 全局配置 git config --global alias.st status git config -...

  • git配置 alias

    命令行设置git的配置 alias 配置 ~/.gitconfig 文件

  • 配置别名

    配置别名案例: git config --global alias.st status == git statu...

  • git常用操作

    git缩写配置: 在.gitconfig文件中添加: [alias] git常用操作: git clone 克隆一...

  • GIT配置和命令

    推荐使用 推荐配置成每个项目单独配置的方式: GIT设置ALIAS别名 GIT更新命令 GIT搜索 在commit...

  • git alias 配置

    通常在使用 git 命令时,要输入很长的命令,可以通过配置 git alias 提高效率 1. 创建别名 使用以下...

  • 我的git使用心得

    小推荐 Linux的shell配置,参考oh-my-zsh git alias的配置,可以参考这里 git ali...

  • zsh git 缩写

    alias ga='git add' alias gb='git branch' alias gba='git b...

  • Git 学习笔记(别名篇)

    配置命令别名 git config --global alias.别名 原名 效果如下所示: $ git conf...

网友评论

      本文标题:git配置 alias

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