步骤

注册

github网址:https://github.com/

安装git

git下载地址 https://git-scm.com/downloads ,一直点击next安装即可

github建立项目

点击 github你的主页右上角,your repositories
在Github上建立项目
点击“NEW”,新建一个项目
在Github上建立项目
输入项目名称,项目描述,点“Create repository”
在Github上建立项目
进入到这个界面
在Github上建立项目

将本地文件上传

定位到要上传的项目所在位置

在此处右击打开git bash here
在Github上建立项目
界面如下
在Github上建立项目
依次输入以下代码
初始化


git init

上传全部文件


git add .

备注


git commit -m "first commit"

上传到指定项目网址


git remote add origin 此处填写之前复制的网址

上传,回车后,会弹出填写用户名和密码界面,登录后即可


git push -u origin master

在Github上建立项目
到此,上传成功,有时候会弹出警告,关掉git Bash再重来一次就可以了
在Github上建立项目

相关文章: