Git简介

一.安装

1.Mac安装

安装homebrew->用homebrew安装Git

命令行下:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install git

2.其他安装可见

https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00137396287703354d8c6c01c904c7d9ff056ae23da865a000

二.配置

$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"

三.创建版本库

1.选择合适的地方,建立空目录

$ mkdir learngit
$ cd learngit
$ pwd

pwd显示当前目录。注意win系统路径中不要有中文

2.把此目录变成Git可管理的仓库

$ git init

3.把文件放到Git仓库需要两步 : add 和commit

$ git add readme.txt
$ git commit -m "wrote a readme file"



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值