git拾遗

作者: 诺之林 | 来源:发表于2018-07-26 23:45 被阅读14次

    目录

    配置

    编辑器

    git config --global core.editor vim
    
    cat ~/.gitconfig | grep editor | cut -f 2
    
    editor = vim
    
    git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -w"
    
    cat ~/.gitconfig | grep editor | cut -f 2
    
    editor = /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n -w
    

    全局忽略

    more -n 10 `cat ~/.gitconfig | grep excludesfile | cut -f 3 -d ' '`
    

    标签

    git checkout master
    
    git merge release/opt
    
    git tag v1.0.1 -m "优化版"
    
    git push upstream v1.0.1
    

    ssh

    ssh-keygen -f ~/.ssh/github
    
    ssh-keygen -f ~/.ssh/gitlab
    
    find ~/.ssh
    
    /Users/yuanlin/.ssh
    /Users/yuanlin/.ssh/github
    /Users/yuanlin/.ssh/github.pub
    /Users/yuanlin/.ssh/gitlab
    /Users/yuanlin/.ssh/gitlab.pub
    
    vim ~/.ssh/config
    
    Host github.com
      IdentityFile ~/.ssh/github
    Host gitlab.com
      IdentityFile ~/.ssh/gitlab
    

    参考

    相关文章

      网友评论

          本文标题:git拾遗

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