需求:在 git-demo 工作区中,添加一个 hello.txt 的文件,并编写任意内容。完成后,将其文件添加至暂存区中,并提交到本地库中。

    实战:

    1. 查看状态

      1. git status

      image.png

    2. 创建文件,编辑文件内容

    image.png

    1. 查看状态,状态对比

    image.png

    1. 添加暂存区

      1. git add hello.txt

      image.png

    2. 查看状态,状态对比

    image.png

    1. 提交本地库
      1. git commit -m "first commit" hello.txt
      image.png

    7.0 查看状态
    image.png