美文网首页
MacOs安装官方git

MacOs安装官方git

作者: Symbian米汤 | 来源:发表于2018-12-08 18:01 被阅读0次

macos系统里自带了 2.17.2版本的git,我想安装官方的最新版git,又习惯使用homebrew.

  • 去官网下载最新版的 目前是2.19.2
  • 安装dmg包
  • 编辑.bash_profile 文件

配置:

原理:git在mac上安装的目录:/usr/local/git/ 将这个目录配置进系统环境变量里

操作命令:

vim ~/.bash_profile

编辑内容:

1.vim .bash_profile
export GIT_HOME=/usr/local/git
export PATH=$GIT_HOME/bin:$PATH

使系统变量生效:

source ~/.bash_profile

验证:

git --version

git version 2.19.2

相关文章

  • 码云&git的使用

    环境:MacOS 1、git下载安装 官方下载地址: https://git-scm.com/downloads/...

  • MacOs安装官方git

    macos系统里自带了 2.17.2版本的git,我想安装官方的最新版git,又习惯使用homebrew. 去官网...

  • Hexo博客搭建(二)从最简单的开始

    安装git, node, hexo macOS和Linux中都自带git,使用macOS的强烈建议安装brew,之...

  • 初识vim

    安装 Windows需要安装Git Bash Linux无需安装 MacOS无需安装 初体验 打开git bash...

  • Git LFS

    MacOS 安装 Brew brew官方[https://brew.sh]官方安装shell命令 安装的shell...

  • Git小记

    1、Git下载与安装 https://git-scm.com 选择对应macOS系统的版本进行安装; 2、Git初...

  • MobSF安装 for Mac

    环境要求 安装 Git 安装 Python 3.7 (3.8 is not supported) macOS Ca...

  • Git 基础操作指南(基础、全面)

    一、Git 安装 在 Windows 上安装 Git 也有几种安装方法。 官方版本可以在 Git 官方网站下载。官...

  • 炫酷的 “oh my zsh”

    一.准备 类unix os(macOs/linux) 安装 curl 或者 wget 安装git 安装 zsh 将...

  • 码云和GIT入门操作

    安装GIT git官方下载git,地址:https://git-scm.com/downloads/ 安装后配置环...

网友评论

      本文标题:MacOs安装官方git

      本文链接:https://www.haomeiwen.com/subject/keoqhqtx.html