github创建项目上传

首先要有一个github帐号

1.选择new repository 创建一个新的仓库

github创建项目上传

我这里为:test_tp5,选择public,然后create respository

github创建项目上传

把连接复制备用

github创建项目上传

2.用安装好的git完成剩下的操作

创建一个文件夹用来存放代码库

github创建项目上传

cd 到这个目录

github创建项目上传

git clone 仓库目录到本地

github创建项目上传

进入目录

github创建项目上传

把项目文件复制进去

github创建项目上传

执行命令git add .   将文件夹下的文件添加进去

github创建项目上传

接着执行命令git commit  -m  "frist" 添加提交的信息,这里如果出现git config --global user.email "[email protected]"
git config --global user.name "Your Name"这两句则需要按顺序执行一下上面出现的两个命令其中你的邮箱和名字就填写自己的就可以了

github创建项目上传

执行命令git push -u origin master 后出现的是要填写帐号和密码,就填写自己的github帐号和密码。

github创建项目上传github创建项目上传

出现以下内容则完成了上传,去github查看一下把

github创建项目上传

登录自己的github帐号鼠标选中头像然后选择your profile

github创建项目上传

点开刚刚创建的仓库看到上传好的项目了就算是完成了

github创建项目上传


以上git push 时thinkphp没有上去,因为.gitignore规则过滤上传这些文件,删除.gitignore就好了,其他文件夹如果有类似情况也是这样操作。

github创建项目上传

github创建项目上传