Git for Windows 安装和基本使用

Git 是用于本地的版本管理工具,也可以与GitHub关联,进行远程合作和共享。

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

下载完毕,开始安装,点击next即可。

使用截图和命令如下:

一、本地使用命令

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

Git for Windows 安装和基本使用Git for Windows 安装和基本使用

Git for Windows 安装和基本使用

二、主要命令

$ git branch  #显示所有本地分支

$ git init   #初始化本地版本库

$ ls -a    #找到目录下.git

$ rm -rf  .git   #删除本地仓库(分支)   可以看到master分支已经删除(test1中隐藏的.git文件夹已经删除) 
删除git之后 再去删除本地的库文件夹即可

三、从github clone项目

git clone [email protected]:google/earthenterprise.git

或者:

GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:google/earthenterprise.git
cd earthenterprise
git lfs pull

Git for Windows 安装和基本使用

选择某一个版本:在github上面找到——

Git for Windows 安装和基本使用

在git中输入:git checkout c8cef00

Git for Windows 安装和基本使用