git的使用

一些常见的单词:

仓库(Repository)

复制克隆项目(Fork)

发起请求(Pull Request)

关注(Watch)

事务卡片(Issue)

常见的指令

git status //查看项目文件状态

提交文件到暂存区:

git add hello.php
git add test.php

提交文件到Git仓库:

git commit -m '提交描述'

GIT的使用步骤

第一步:进行git配置:

git config --global user.name 'meiyouzhanghao'
git config --global user.email 'fuyongzhou@sohu.com'
git config --list // 查看配置

第二步:初始化git

git init

第三步:查看git状态

git status

第四步:使用 git add 文件名 提交到暂存区

git add test.php

第五步:将暂存区的文件提交到 git 仓库

git commit -m '这里是描述'

验证:使用 git status

工作目录干净,就说明提交成功了。

第六步:提交到项目到远程仓库

git push

就可以看到提交上去了。

原文地址:https://www.cnblogs.com/e0yu/p/8607400.html