window 10 使用git

1、概述

  git是开源的分布式版本控制工具,作者是写Linux的Linus Torvalds。初衷是为了管理Linux内核。

     git和GitHub的关系事后再讲。

2、安装git

  2.1 下载

     下载地址:https://gitforwindows.org/        或    http://git-for-windows.github.com

     

      下载好是这个样子

      

      点击安装一路点next就好了

3、创建代码仓库

    3.1打开Git Bash,并告诉它我是谁

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

      

    3.2创建代码仓库

      选中项目目录,这里我以我自己的D:\codePy\test项目为例

      

      

    就完成了,项目目录下出现了隐藏目录“.git”

      

4、提交本地代码

    4.1 插入全部文件

git add .

     

    4.2 提交

git commit -m " first commit"

    

     一定要用 - m 来添加描述信息

  

猜你喜欢

转载自www.cnblogs.com/qiuye98/p/10031233.html