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一个仓库即可操作。

  • 相关阅读:
    方法参数个数最多不宜超过4个
    避免方法中使用大量局部变量
    JQuery学习备忘
    CSS学习备忘
    解析Path方法备忘
    获取差集合的一种实现思路
    前台JSP页面独立化
    requireJs的使用
    handlebar
    移动端h5<a>标签点击样式去除
  • 原文地址:https://www.cnblogs.com/Walker-lyl/p/6806245.html
Copyright © 2011-2022 走看看