教你上传本地代码到github
来源:互联网 发布:淘宝店铺头像可以换吗 编辑:程序博客网 时间:2024/05/19 15:20
1. 建立git仓库
cd到你的本地项目根目录下,执行git命令
git init
2. 将项目的所有文件添加到仓库中
git add .
如果想添加某个特定的文件,只需把.换成特定的文件名即可。
3. 将add的文件commit到仓库
git commit -m "注释语句"
4.去github上创建自己的Repository
创建页面如下图所示:
点击下面的Create repository,就会进入到类似下面的一个页面,拿到创建的仓库的https地址,红框标示的就是
5. 重点来了,将本地的仓库关联到github上
git remote add origin https://github.com/hanhailong/CustomRatingBar
后面的https链接地址换成你自己的仓库url地址,也就是上面红框中标出来的地址。
6.上传github之前,要先pull一下,执行如下命令:
git pull origin master
敲回车后,会执行输出类似如下
7.也就是最后一步,上传代码到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
- HDU 4746 Mophues (莫比乌斯反演应用)
- 【Java学习笔记】正则表达式·集合和列表
- RequestContextHolder分析及Java代码
- 根据日期算星期
- 函数响应式编程及ReactiveObjC学习笔记 (二)
- 教你上传本地代码到github
- [NYOJ
- Redis 学习手册(—)
- linux下多人聊天室
- ORACLE 递归查询 菜单树
- Netbean导入现有Java Web项目
- Mysql(Innodb)如何避免幻读
- 2017-08-12 NOIp
- 人类如何思考