mac环境下,git安装和使用
时间:2019-06-23 14:16:26
收藏:0
阅读:1256
1. 在官网下载git
官网地址:https://git-scm.com/downloads
选择对应的版本,安装即可
查看git版本:git --version
2. 通过homebrew安装git
安装homebrew;
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
homebrew安装完成以后检查一下:brew -v
通过brew来安装git
brew install git
安装完成以后即可使用git --version来查看版本
示例:使用git从网上将一个项目拖到本地
- 创建一个文件夹,取名为project
- 使用命令进入到该文件夹
- 使用命令下载远程的项目,git clone 项目路径,这里的项目地址
git clone https://github.com/Rainno/vue-es6-webPack.git
然后,在创建的文件夹中即可看到下载的项目
到这里,git就安装好了
评论(0)