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. CSS-给Font Awesome拓展Base64编码的图标

    和 fa 一样设置到::before中就行了,不过 fa 是直接设置内容,这里用的背景图 .fa-science-garden::before { content: ""; dis ...

  2. Laex/Delphi-OpenCV

    https://github.com/Laex/Delphi-OpenCV 66 Star119 Fork75 Laex/Delphi-OpenCV CodeIssues 3Pull requests ...

  3. 面试题40:最小(大)的K个数

    剑指offer40题,同时这也是面试高发题目 2019.4 蚂蚁金服问道:求1000万个数据中的前K个数. 思路: 1.直接上排序算法,然后我们就取排好顺序的前K个即可.但是单考虑快排,时间复杂度也要 ...

  4. 手机网页制作的认识(有关meta标签)(转)

    仅用来记录学习: 链接地址:https://blog.csdn.net/ye1992/article/details/22714621

  5. C#序列化json属性名首字母变成小写的解决方案

    原文:C#序列化json属性名首字母变成小写的解决方案 //接口返回自动转小写,容易造成前后端不一致,获取不到数据,切换成转驼峰(首字母大写)如Code/Result //在ConfigureServ ...

  6. 如何去掉万恶的wps屏保

    自从换了上个UI的电脑后,就莫名其妙的多了屏保,最开始以为屏蔽掉就好了,发现他依然不屈不挠的有,然后就百度了好多,也没找到...心累 今天终于开窍了,在角落里找打了.话不多说,上图 打开首页,找到应用 ...

  7. SecureCRT安装,服务器远程连接客户端SSH

    SSH: Secure Shell 的缩写,是用来连接Linux服务器系统的软件.   它可以同时创建多个连接,方便对服务器的操作使用,界面也比Linux系统好看的多,同时安装一些必备的软件能更加方便 ...

  8. 四、bootstrap-Table

    一.bootstrap-Table基础表格 <!DOCTYPE html> <html lang="en"> <head> <meta c ...

  9. 笔记72 高级SSM整合

    遇到的问题: 1.进行spring mvc测试的时候报错 测试代码: package com.li.test; import com.github.pagehelper.PageInfo; impor ...

  10. java 比较运算

    /* 比较运算符: 大于 > 小于 < 大于等于 >= 小于等于 <= 等于 == 不相等 != 注意事项: 1.比较运算符的结果一定是一个boolean值,成立就是true, ...