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
    
  • 相关阅读:
    CF766 ABCDE
    CF767 C.Garland DFS
    CF767 B. The Queue 贪心+细节
    CF767 A. Snacktower 暴力
    CF760 D Travel Card 简单DP
    CF760 C. Pavel and barbecue 简单DFS
    CF758 D. Ability To Convert 细节处理字符串
    ZOJ 3787 Access System 水
    ZOJ 3785 What day is that day?
    ZOJ 3782 G
  • 原文地址:https://www.cnblogs.com/mengd/p/9449827.html
Copyright © 2011-2022 走看看