1、概述

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

     git和GitHub的关系事后再讲。

2、安装git

  2.1 下载

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

     window 10 使用git

      下载好是这个样子

      window 10 使用git

      点击安装一路点next就好了

3、创建代码仓库

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

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

 

      window 10 使用git

    3.2创建代码仓库

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

      

      window 10 使用git

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

      window 10 使用git

4、提交本地代码

    4.1 插入全部文件

git add .

 

     window 10 使用git

    4.2 提交

git commit -m " first commit"

    window 10 使用git

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

  

相关文章:

  • 2021-04-03
  • 2022-03-05
  • 2022-12-23
  • 2021-07-11
  • 2021-10-17
  • 2021-04-13
猜你喜欢
  • 2021-08-09
  • 2021-12-08
  • 2022-12-23
  • 2021-11-21
  • 2021-11-07
  • 2022-12-23
相关资源
相似解决方案