[转] 本地项目上传github (新项目 / 旧项目)
前置:安装Git Bash,在github上新建仓库repository
1、右键点击项目所在文件夹,运行: git bash here。在git bash窗口运行命令 git init 把这个目录变成git可以管理的仓库
git init
2、把文件添加到版本库中,使用命令 git add . 添加到暂存区里面去,不要忘记后面的小数点“.”,意为添加文件夹下的所有文件
git add .
3、用命令 git commit告诉Git,把文件提交到仓库。引号内为提交说明
git commit -m 'first commit'
4、关联到远程库 git remote add origin 你的远程库地址
如:
git remote add origin https://github.com/cade8800/ionic-demo.git
5、获取远程库与本地同步合并(如果远程库不为空必须做这一步,否则后面的提交会失败)
git pull --rebase origin master
6、把本地库的内容推送到远程,使用 git push命令,实际上是把当前分支master推送到远程。执行此命令后会要求输入用户名、密码,验证通过后即开始上传。
git push -u origin master
7、状态查询命令
git status

本文借鉴自: https://www.cnblogs.com/eedc/p/6168430.html
[转] 本地项目上传github (新项目 / 旧项目)的更多相关文章
- vue项目上传Github预览
最近在用Vue仿写cnode社区,想要上传到github,并通过Github pages预览,在这个过程中遇到了一些问题,因此写个笔记,以便查阅. 完成Vue项目以后,在上传到github之前,需要修 ...
- iOS 本地项目上传github,github管理项目配置
一.注册github账号 首先需要注册一个github账号,注册地址:https://github.com 接着会来到这 然后会收到一封github发的邮件,进入邮箱验证 二.创建个人的githu ...
- angular2新建的项目上传github
前提1.git配置好,参见博文 git常用操作 2.angular2安装配置好,这个网上有很多教程,就不多说了,参见angular2快速起步 需要注意的是,大部分问题都是网络问题. 3.新建一个ng项 ...
- 如何把本地文件上传github
1.$ git config --global user.name "xxx" 2.$ git config --global user.email xxx@qq.com 3.进入 ...
- 本地项目上传github
(1)github上面新建仓库 (2) 1. git init //初始化仓库 2. git add .(文件name) //添加文件到本地仓库 3. git commit -m "firs ...
- android项目上传github
很简单
- 本地文件上传GitHub
(1)mkdir 项目名称(2)cd 项目名称(3)git init 把它变成可管理的Git仓库(4)git status 查看状态(5)git add . 点用空格隔开(6)git status ...
- win10 将本地项目上传到github (第一次+再次上传)
推荐网址: https://blog.csdn.net/zamamiro/article/details/70172900 https://blog.csdn.net/qq_15800305/arti ...
- 如何使用IDEA将项目上传到GitHub中
上传之前先规定上传的格式: 1 . 以后所有上传的项目,都只上传 src文件集以及pom.xml文件,不要带有自己的 .idea配置文件或者target运行文件之类的(就算是测试文件也一样,从开始就养 ...
随机推荐
- (转载)Catalan数——卡特兰数
Catalan数——卡特兰数 今天阿里淘宝笔试中碰到两道组合数学题,感觉非常亲切,但是笔试中失踪推导不出来后来查了下,原来是Catalan数.悲剧啊,现在整理一下 一.Catalan数的定义令h(1) ...
- LeetCode 188. Best Time to Buy and Sell Stock IV (stock problem)
Say you have an array for which the ith element is the price of a given stock on day i. Design an al ...
- java 通过反射机制调用某个类的方法
package net.xsoftlab.baike; import java.lang.reflect.Method; public class TestReflect { public s ...
- 九度oj 题目1055:数组逆置
题目1055:数组逆置 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:8225 解决:3932 题目描述: 输入一个字符串,长度小于等于200,然后将数组逆置输出. 输入: 测试数据有多组 ...
- 61. mybatic insert异常:BindingException: Parameter 'name' not found【从零开始学Spring B】
mybatic insert异常:BindingException: Parameter 'name' not found [从零开始学习Spirng Boot-常见异常汇总] 异常信息如下: nes ...
- MTK平台添加防止误触代码
ltr559_old: #include <linux/interrupt.h> #include <linux/i2c.h> #include <linux/slab. ...
- 1 problem was encountered while building the effective model [FATAL] Non-parseable POM F:\MavenRepository\org\apache\maven\plugins\maven-resources-plugin\2.6\maven-resources-plugin-2.6.pom: start tag
Multiple annotations found at this line: - No plugin found for prefix 'war' in the current project a ...
- Ubuntu 16.04硬盘有坏道,开机显示blk_update_request:I/0 error
可以尝试以下方式解决: 1.检查坏道(效果明显,但是比较慢,检查出来并没有什么用,只是知道有坏块) sudo badblocks -s -v -o /root/bb.log /dev/sda1 2.快 ...
- Ubuntu 16.04无损分区大小调整工具Gparted
安装: sudo apt-get install gparted 使用: 注意: 这款软件可以调整分区大小,且支持无损,但是对于/根目录的分区无法调整,但是它提供ISO工具,可以启动后进行调整. 下载 ...
- VMware配置从U盘启动
很遗憾,VMware的BIOS不能识别USB启动设备,即使已经把USB设备连接上去. 解决这一问题的做法是直接添加硬盘,硬盘指向物理硬盘,即USB设置. 注意:Ubuntu下要设置这一功能需要使用su ...