Git运用 一 (Gitee版)

39 阅读1分钟

1.Git本地命令

先创建一个本地仓库

          右键 Git Bash Here

          

         

    查看git版本 git --version

   公共配置添加用户    git config --global user.name "tong"

 

   初始化一下本地仓库 (初始化命令) git init 

  

   在git中添加一个文件

  用来做git新增提交 用commit    如: git commit  -m "get_tong.txt modifed by tong jin"

修改的文件需要再次提交 先要  git add "get_tong.txt"  

再 git  commit  -m " git add get_tong.txt second modified by tong jin"  其中 "tong jin" 为注释

查看文件状态( git status )

没有提交的状态

                                              git   存储流程

  代码工作区 ---> 执行git add  ---> 暂存区(临时文件) --->执行git commit  --->本地库(历史版)