1、安装git版本可以参见官网的安装方式
2、git在使用前需要做最小配置
git config --global user.name "your_name";
git config --global user.email "your_email@domain.com"
注意:除了进行全局配置也可以在不同的作用域下进行配置如下
git config --local //只对某个仓库有效,一般在建立仓库的目录下进行配置 git config --global //对当前用户的所有仓库有效 git config --system //对系统所登录的用户有效(用得少)
查看配置信息
git config --local --list //列出当前本地的配置信息,在仓库目录下有效 git config --global --list //列出全局的用户配置信息 git config --system --list //列出所登录的用户的配置信息
3、git创建仓库
a、从远程克隆仓库:如果线上已有代码,只需要克隆线上的代码下来开发,那么可以采用这种方式
//先cd到指定的目录下 git clone https://gitee.com/xxxx.git
原文:https://www.cnblogs.com/rickyctbu/p/11406719.html