一、创建仓库
- 假如Responsitory name是Hello-World
Description一栏中可以设置仓库的说明。
- Public, Private
在这一栏可以选择Public还是Private, 创建公开仓库,仓库里的所有内容都会被公开。
- Initializing this responsitory with a README
注:若想向github中添加手中已有的Git仓库,建议不要勾选
二、连接仓库
- Github初始URL
URL:
https://github.com/用户名/仓库名
下图我们可以看到分别使用HTTP和SSH两种不同的方法克隆的路径:网址:yii666.com
法一:
法二:
- 克隆
输入完成后,结果如下:
- 编辑新文件:
进入Scrapy文件夹
cd Scrapy
编写一个hello_world.php 文件,保存
touch hello_world.php
vim hello_world.php
- 查看状态
git status文章地址https://www.yii666.com/article/764227.html
- 提交:
git add hello_world.php
git commit -m "Add hello world script by php "
通过git add命令将文件加入暂存区 ,再通过git commit命令 提交。
添加成功后,
- 查看日志
git log
或
git log --oneling --graph
执行成功后,在执行push,上传改动代码到Github仓库
- 上传代码
git push
- 验证
在目录http://github.com/用户名/仓库名下查看:
文章来源地址:https://www.yii666.com/article/764227.html
以上就是Github的公开代码流程