教你上传本地代码到github
来源:互联网 发布:西安网络推广价格 编辑:程序博客网 时间:2024/05/27 10:42
本文出自:【海龙的博客】http://blog.csdn.net/hanhailong726188/article/details/46738929
第一步:建立git仓库
cd到你的本地项目根目录下,执行git命令
git init
第二步:将项目的所有文件添加到仓库中
git add .
1
如果想添加某个特定的文件,只需把.换成特定的文件名即可
第三步:将add的文件commit到仓库
git commit -m "注释语句"
第四步:去github上创建自己的Repository,创建页面如下图所示:
点击下面的Create repository,就会进入到类似下面的一个页面,拿到创建的仓库的https地址,红框标示的就是
第五步:重点来了,将本地的仓库关联到github上
git remote add origin https://github.com/hanhailong/CustomRatingBar
- 1
- 1
后面的https链接地址换成你自己的仓库url地址,也就是上面红框中标出来的地址
第六步:上传github之前,要先pull一下,执行如下命令:
git pull origin master
- 1
- 1
敲回车后,会执行输出类似如下
第七步,也就是最后一步,上传代码到github远程仓库
git push -u origin master
执行完后,如果没有异常,等待执行完就上传成功了,中间可能会让你输入Username和Password,你只要输入github的账号和密码就行了
最后附上代码上传成功后的截图:
谢谢大家!
0 0
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- 教你上传本地代码到github
- Ubuntu搜狗输入法无法输入中文等问题
- 内容分发网络cdn在热更重的作用
- 暴力求解数独
- windows下spark2.1源码编译及修改
- 解决有道for mac 无法屏幕取词
- 教你上传本地代码到github
- 【NOIP2010初赛】【斜率优化】【DP】烽火传递 题解
- A. Fake NP
- Js 深拷贝,很好理解的方式之一
- 指示函数(indicator function) 的作用
- python2.7 爬虫中文显示错误
- ASP.NET MVC开发(0)
- 卷积神经网络CNN_综述一
- 域控制器