一、GitHub 注册
GitHub是基于Git的在线代码托管工具, 注册地址:https://github.com
二、安装Git for Windows(64位)
下载地址:https://git-for-windows.github.io/;
三、GitHub的使用
1.创建一个GitHub项目
![](https://img.haomeiwen.com/i14946265/96a61e8c7cba6adf.png)
2.选择本地工程目录右击,选择Git Bash Here命令,打开Git命令行,输入命令 git init,生成.git隐藏文件夹
![](https://img.haomeiwen.com/i14946265/0a3405dd9d232e63.png)
3..输入命令git add -A,将工程文件夹内的项目添加
![](https://img.haomeiwen.com/i14946265/55dc4075eb6eeffd.png)
4.输入命令git commit -m "Anesthesia";
![](https://img.haomeiwen.com/i14946265/604cc7b32df2b844.png)
5.输入命令git remote add origin https://github.com/M1nion/ysu_master.git;(初次git项目的时候输入,再上传的时候,不用再输入)
6.输入命令git push -u origin master;(初次push时使用-u,再次push时不用)
![](https://img.haomeiwen.com/i14946265/5336936484bcd1bd.png)
7.GitHub刷新展示
网友评论