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)

    1. Create the remote repository, and get the URL such asgit@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


    2. Locally, at the root directory of your source, git init

    3. Locally, add and commit what you want in your initial repo (for everything, git add . git commit -m 'initial commit comment')


    4. to attach your remote repo with the name 'origin' (like cloning would do)
      git remote add origin [URL From Step 1]

    5. Execute git pull origin master to pull the remote branch so that they are in sync.
    6. to push up your master branch (change master to something else for a different branch):
      git push origin master

从源码导入到github的更多相关文章

  1. 将github上的项目源码导入eclipse详细教程

    将github上的项目源码导入eclipse详细教程 学习了: http://blog.csdn.net/itbiggod/article/details/78462720

  2. spring源码解析——spring源码导入eclipse

    一.前言     众所周知,spring的强大之处.几乎所有的企业级开发中,都使用了spring了.在日常的开发中,我们是否只知道spring的配置,以及简单的使用场景.对其实现的代码没有进行深入的了 ...

  3. spring4.0源码导入

    一个面试,让我知道了自己的不足,一天不进步就是倒退. spring源码导入eclipse 本人的环境 (我导入的是最新的spring 4.0 所以要用jdk1.8) 1 安装git (mac上自带了g ...

  4. 如何将OpenTSDB源码导入eclipse

    OpenTSDB的官网上介绍了如何将OpenTSDB源码导入eclipse,官方链接,但步骤超级繁琐,还有一个简便方法,下面以导入OpenTSDB2.0.0为例. 1. 下载OpenTSDB2.0.0 ...

  5. 如何将spring源码导入到eclipse中

    如何将spring源码导入到eclipse中 1. 下载spring源码  可以在github官网中找到spring源码来下载,或者直接通过git下载,是一样的,这里演示 直接在github网站下载, ...

  6. Tomcat源码导入eclipse的步骤

    Tomcat源码导入eclipse 一.下载源码 1.  进入Apache 官网:http://tomcat.apache.org/ 2.  在左边侧选择要下载的源码的版本. 3.  或者直接通过Ar ...

  7. 将Android系统源码导入ecplise

    Android系统源码中带有个IDE的配置文件,目录为:development/ide/ 如果要用eclipse导入查看系统源码,则将development/ide/eclipse/.classpat ...

  8. [C] tcharall(让所有平台支持TCHAR)v1.1。源码托管到github、添加CMake编译配置文件、使用doxygen规范注释

    作者:zyl910 v1.1版的改动如下—— 将源码上传到github. 调整目录结构. 添加CMake编译配置文件. 使用doxygen规范注释. 文件清单—— docs\ docs\images\ ...

  9. [C] c99int(让VC等编译器自动兼容C99的整数类型)V1.02。源码托管到github、添加CMake编译配置文件、使用doxygen规范注释

    新版本—— http://www.cnblogs.com/zyl910/p/zlstdint_v100.html[C] zlstdint(让VC.TC等编译器自动兼容C99的整数类型)V1.0.支持T ...

随机推荐

  1. net core 发布docker镜像的官方写法

    使用vscode发布的镜像可能存在不能运行的问题, 可以去docker的官方文档下找一个标准的格式再替换一下就可以用了: FROM mcr.microsoft.com/dotnet/core/sdk: ...

  2. Map:template

    ylbtech-Map-Amap|Baidu: 1.返回顶部   2.返回顶部   3.返回顶部   4.返回顶部   5.返回顶部     6.返回顶部   7.返回顶部   8.返回顶部   9. ...

  3. 建站手册-网站构建:万维网联盟(World Wide Web Consortium)

    ylbtech-建站手册-网站构建:万维网联盟(World Wide Web Consortium) 1.返回顶部 1. http://www.w3school.com.cn/site/site_w3 ...

  4. Chrome-谷歌页面翻译增强插件开发

    最近想做一个 Chrome 的插件(看别的博客说其实叫插件不准确,应该叫拓展,大家叫习惯了就按习惯的来吧).一开始咱先直接看了[Chrome 开发(360 翻译)](http://open.chrom ...

  5. jQuery的toggle事件

    $(function () {    //默认隐藏   $("#SelTime").hide();  $("#SeniorSel").toggle(      ...

  6. “希希敬敬对”队软件工程第九次作业-beta冲刺第五次随笔

    “希希敬敬对”队软件工程第九次作业-beta冲刺第五次随笔 队名:  “希希敬敬对” 龙江腾(队长) 201810775001 杨希                   201810812008 何敬 ...

  7. Seq2Seq和Attention机制入门介绍

    1.Sequence Generation 1.1.引入 在循环神经网络(RNN)入门详细介绍一文中,我们简单介绍了Seq2Seq,我们在这里展开一下 一个句子是由 characters(字) 或 w ...

  8. 用u盘和iso镜像文件装win8.1系统

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/xyl295528322/article/details/37910939 原料: 1.老毛桃U盘启动 ...

  9. 使用api获取数据————小程序

    使用api获取数据----小程序 onLoad: function (options) { //打开页面即执行. let that = this; wx.request({ //建立链接 url: ' ...

  10. 2018-8-10-wpf-绑定-DataGridTextColumn-

    title author date CreateTime categories wpf 绑定 DataGridTextColumn lindexi 2018-08-10 19:16:53 +0800 ...