zoukankan      html  css  js  c++  java
  • Linux-git安装

    基本操作

    1. 安装yum install git
    2. 生成SSH KEY :先cd ~/.ssh,在这个目录下输入ssh-keygen,一直回车就可以了,这个时候就会出现id_rsd.pub公钥和id_rsa私钥,然后cat id_rsa.pub,把这个公钥复制到对应的码云平台或者是github上,配置SSH Key
    3. 基本命令
    git config git init
    git clone git remote
    git fetch git commit
    git rebase git push
    1. 此时就可以通过git clone github上对应ssh连接,把代码克隆到本地了

    学习网址http://www.runoob.com/git/git-tutorial.html

    命令自动补全

    1. 下载源码 使用下载源码中的 git-completion.bash 自动补全命令的文件 git clone git@github.com:git/git.git ,前提是你在github上配置了公钥
    2. 复制git-completion.bash 文件cp contrib/completion/git-completion.bash /etc/bash_completion.d/
    3. 加载bash脚本source /etc/bash_completion.d/git-completion.bash
    4. 自动加载脚本,编辑vim ~/.bash_profile,添加下面的就可以了
    # Git bash autoload
    if [ -f /etc/bash_completion.d/git-completion.bash ]; then
    source /etc/bash_completion.d/git-completion.bash
    fi
    
  • 相关阅读:
    时间计算
    DateTime
    C# trim split dataGrid
    something
    生活
    如何导入外部的源码到eclipse中
    java类中获取ServletContext的方法
    获取spring容器上下文(webApplicationContext)的几种方法
    java反射(转)
    mysql常见命令
  • 原文地址:https://www.cnblogs.com/mengd/p/9449827.html
Copyright © 2011-2022 走看看