zoukankan      html  css  js  c++  java
  • git使用前配置

    1、git push origin <当前分支>:refs/for/<当前分支>,简化为git gpush

    执行配置:

    git config --global alias.gpush '!f() { : push ; r=$1; [[ -z $r ]] && r=origin; b=$2; t=$(awk "{ print $2 }" $(git rev-parse --git-dir)/HEAD); t=${t#refs/heads/}; [[ -z $b ]] && b=$t; cmd="git push $r HEAD:refs/for/$b%topic=$t"; echo $cmd; echo; $cmd; }; f'

    然后

    设置:

    git config —local remote.origin.push ‘refs/heads/:refs/for/‘

    取消

    git config —unset —local remote.origin.push

     

    2、自动补全

    curl -s http://svn.baidu.com/downloads/git-completion.bash >~/.git-completion.bash
    source ~/.git-completion.bash

    3、账号配置:

    git config —global user.email liyanlei01@baidu.com (把liyanlei01badiu.com改为你的邮箱)
    git config —global user.name liyanlei01 (把yangyang22改为你的账号)

    4、秘钥配置:

    ssh-keygen -t rsa # 一路回车选默认选项

    之后creata或者clone一个仓库即可操作。

  • 相关阅读:
    chattr
    chage命令
    passwd命令
    usermod命令
    userdel命令
    useradd命令
    信息热词分析系统重构
    pandas数据清洗
    python 中mysql数据库的读写
    java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
  • 原文地址:https://www.cnblogs.com/Walker-lyl/p/6806245.html
Copyright © 2011-2022 走看看