从源码导入到github
http://stackoverflow.com/questions/4658606/import-existing-source-code-to-github
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source)
Create the remote repository, and get the URL such as
git@github.com:/youruser/somename.git
orhttps://github.com/youruser/somename.git
If your local GIT repo is already set up, skips steps 2 and 3
Locally, at the root directory of your source,
git init
Locally, add and commit what you want in your initial repo (for everything,
git add .
git commit -m 'initial commit comment'
)to attach your remote repo with the name 'origin' (like cloning would do)
git remote add origin [URL From Step 1]
- Execute
git pull origin master
to pull the remote branch so that they are in sync. - to push up your master branch (change master to something else for a different branch):
git push origin master
最新文章
- gulp使用小结(二)
- jsp+servlet+mysql 实现简单的银行登录转账功能
- Java中Comparable和Comparator实现对象比较
- htmlnav
- 测试bug级别定义
- TNT平台
- 阿里巴巴fastJson
- Unity 地形
- Bundle压缩JS和CSS
- python executemany的使用
- Java基础学习笔记十 Java基础语法之final、static、匿名对象、内部类
- Common-used commands in Docker
- WordCount作业修改
- 20135327--linux内核分析 实践二
- 【费用流】【网络流24题】【P4014】 分配问题
- 【漏洞预警】方程式又一波大规模 0day 攻击泄漏,微软这次要血崩
- SpringCloud——服务网关
- Java开发工程师(Web方向) - 01.Java Web开发入门 - 第1章.Web应用开发概述
- JS之DOM对象二
- numpy.argmax 用在求解混淆矩阵用
热门文章
- java并发编程笔记(十)——HashMap与ConcurrentHashMap
- 异常的处理try-catch
- Cocos2d-x之Map<;K, V>;
- python-javascript之dom
- mysql 查看数据库最大连接数
- sourcetree配置gitlab
- 关于she&#39;ll脚本中";echo -e";使用sh命令执会显示参数";-e";-的问题
- ArcGIS 面要素缝隙孔洞检查代码 C# GP
- python2和python3编码
- HTML 使用CSS 如何去掉文本聚焦框 HTML 使用CSS 如何去掉文本聚焦框 : outline 值设为none 修改input、textarea输入框placeholder样式