上传HTML文件到github上面
2017-09-24 本文已影响0人
幸运密码_xymm16888
注意:以下所有的文件名,尽可能都用 英文、下划线、数字的组合,不要有汉字。
1、注册一个 github 账户
2、下载一个 git gui 的版本控制桌面版
3、去磁盘创建一个专门用来放 git 文件的文件夹
4、在这里找到刚才创建的目录

5、从这打开刚才创建的目录

6、去磁盘,把自己的HTML文件夹项目,拷贝到创建的那个 git 磁盘文件夹下面,里面应该还有一个 .git 的文件夹,默认是隐藏的,这里设置显示。

7、点击下面的12345个步骤进行,通常第一次使用时,在第3步会弹出提示你没有登录,请看我的第8个步骤。

8、如果是初次使用,会弹框提示你没有登录用户名,要打开命令行进行登录,命令行输入:
git config –global username mygithub_name
git config –global password mygithub_password

资源里面点击 git Bash ,在命令行里面输入你的账号和密码,按照上面的两行格式,然后关闭就可以了。
9、提交成功会显示 success 然后在 github 官网就能看到提交成功的项目了。


10、进入 github 官网,点击 settings


11、Settings ---> GitHub Pages 里面设置好之后,上面会出现一个网页前缀,是项目所在地址,加上HTML文件就能打其它上方欣赏到你的佳作了。
格式:
https://你的github用户名.github.io/项目名/文件夹名/文件名.html
注意:项目名是你在 github官网 设置的名称,不是你项目的文件夹名称。