zoukankan      html  css  js  c++  java
  • Git | 安装git

    1、Linux下安装git

    以CentOS 8安装git为例:

    1.1、安装系统源自带的git版本

    此方法安装的git版本可能低于最新版本。如果需要使用最新版本的git,推荐使用源码安装。

    # 安装git
    yum install -y git
    # 查看版本
    git --version
    

    1.2、指定源码安装git

    # 1、安装依赖
    [root@localhost ~]# yum install -y gcc openssl openssl-devel curl curl-devel unzip perl perl-devel expat expat-devel zlib zlib-devel asciidoc xmlto gettext-devel openssh-clients
    # 2、进入指定目录
    [root@localhost ~]# cd /usr/local/src
    # 3、下载git源文件
    [root@localhost src]# wget https://www.kernel.org/pub/software/scm/git/git-2.29.2.tar.xz
    # 4、解压
    [root@localhost src]# tar -xvf git-2.29.2.tar.xz
    # 5、进入解压目录
    [root@localhost src]# cd git-2.29.2/
    # 6、编译
    [root@localhost git-2.29.2]# make prefix=/usr/local/git all
    # 7、安装
    [root@localhost git-2.29.2]# make prefix=/usr/local/git install
    # 8、添加环境变量
    [root@localhost git-2.29.2]# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
    # 9、刷新(使修改的文件生效)
    [root@localhost git-2.29.2]# source /etc/profile
    # 10、查看版本
    [root@localhost git-2.29.2]# git --version
    

    2、Win下安装git

    官网下载git安装程序,直接安装。

    git官网:https://git-scm.com/

  • 相关阅读:
    MVC中使用jquery的浏览器缓存问题
    3 工厂方法模式
    2 简单工厂模式
    1 单例模式
    Sqlserver With as
    Memcache的使用
    mysql的分区和分表
    MySQL主从复制与读写分离
    SqlServer 表分区
    SqlServer 2012 AlwaysOn
  • 原文地址:https://www.cnblogs.com/Cyzhouke/p/14026385.html
Copyright © 2011-2022 走看看