Github上传自己的工程
1.注册并新建项目

2.配置github for windows
前题:安装相应的github for windows
2.1 获取密钥
可以用命令的模式(Git bash),参考资料中有相应的用法;在这里我用图形来获取(Git GUI)。
在help>show ssh key>点击generate key


在网页,自己的设置中
添加上面的密钥,如下图

再在Git Bash输入命令查看是否成功

2.2 配置信息
git config --global user.name "自己的用户名"
git config --global user.email "自己的邮箱"
2.3 上传文件
可以先克隆仓库。(git clone 工程网址)
我选择另外一种方式。
首先在git在本地创建一个相同的项目;
git init //初始化
touch README.md
git add README.md //更新README文件
git commit -m '1st_commit'
git remote add origin git@github.com:你的用户名/工程名.git //连接远程github项目
git push -u origin master //将本地项目更新到github项目上去
出现的问题:
1).
git remote add origin git@github.com:defnngj/Data_Structure.git //连接远程github项目
出现:
fatal: remote origin already exists.
git remote rm origin
2).
git push -u origin master //将本地项目更新到github项目上去
出现:
error:failed to push som refs to
git pull origin master
3).
git push -u origin master

方案:
git pull --rebase origin master

4)

查看

添加
git add <file>...
参考资料:
http://www.cnblogs.com/fnng/archive/2011/08/25/2153807.html
http://www.cnblogs.com/findingsea/archive/2012/08/27/2654549.html
http://jingyan.baidu.com/article/f7ff0bfc7181492e27bb1360.html
http://blog.csdn.net/samhacker/article/details/20129213
Github上传自己的工程的更多相关文章
- 【iOS 使用github上传代码】详解
[iOS 使用github上传代码]详解 一.github创建新工程 二.直接添加文件 三.通过https 和 SSH 操作两种方式上传工程 3.1https 和 SSH 的区别: 3.1.1.前者可 ...
- 往github上传demo
一直在github上寻找demo,但怎么传demo上githun呢? http://www.2cto.com/kf/201504/390397.html 首先在github上 new一个reposit ...
- Github上传更新
通过2天的时间,不停的网上找各种资料,今天下午终于可以登录上github for Windows 客户端了,,, 然后通过一整晚的摸索,也把项目上传到github里. github地址:https:/ ...
- 第一次往github上传文件步骤
第一次往github上传文件步骤: 1> 从右上角 '+' 位置下拉菜单中,创建一个repository 2>从右上角头像位置下拉菜单 setting中设置 SSH keys 3>打 ...
- github上传本地项目
github上传本地项目,分为两个部分: 1.如果建立了ssh key的,直接看第二部分的上传部分就行了 2.如果没有建立ssh key的,就从头开始看吧 ——————————————————我是快乐 ...
- Github上传代码菜鸟超详细教程【转】
最近需要将课设代码上传到Github上,之前只是用来fork别人的代码. 这篇文章写得是windows下的使用方法. 第一步:创建Github新账户 第二步:新建仓库 第三部:填写名称,简介(可选), ...
- github 上传或删除 文件 命令
git clone https://github.com/onionhacker/bananaproxy.git cd ~/../.. git config --global user.email & ...
- GitHub上传文件或项目的教程
既然是往GitHub上传文件,那GitHub账号必须得有,这时候就会有同学问:妖怪吧,我没有GitHub账号怎么办? 别急别急,打开GitHub网站https://github.com/,然后注册就O ...
- github上传时出现error: src refspec master does not match any解决办法
github上传时出现error: src refspec master does not match any解决办法 这个问题,我之前也遇到过,这次又遇到了只是时间间隔比较长了,为了防止以后再遇到类 ...
随机推荐
- spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js...
问题:spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js... web.x ...
- get------引用接口
关于引用接口 1. 通过get方式 2. String poiUrl="http://接口地址?接口ID=接口给你的ID&参数1=?&参数2=?&参数 ...
- Android中使用AlarmManager进程被删除的解决办法
http://blog.csdn.net/zhouzhiwengang/article/details/13022325 在Android中,AlarmManager提供了不受休眠状态的系统定时功能, ...
- POJ题目排序的Java程序
POJ 排序的思想就是根据选取范围的题目的totalSubmittedNumber和totalAcceptedNumber计算一个avgAcceptRate. 每一道题都有一个value,value ...
- 手写json
json的意思是JavaScript 对象表示法 '{"0":0,"b":[3,4,5],"c":"0","d ...
- Jquery cxColor 示例演示
今天第一次自己做调色板调用,看了半天官方的例子愣是没看懂,唉,码农老矣,尚能码否? 经过对官方下载的示例一删一浏览终于弄出来了,这么简单的东西,官方的Demo逼格也太高了 上代码: <!DOCT ...
- 关于flume配置加载
最近项目在用到flume,因此翻了下flume的代码, 启动脚本: nohup bin/flume-ng agent -n tsdbflume -c conf -f conf/配置文件.conf -D ...
- 使用snmp+mrtg监控CPU、流量、磁盘空间、内存
1.安装snmp rpm -qa|grep snmp* //查看是否安装了snmpyum -y install snmp* //安装snmp #vim /etc/snmp/snmpd.confroco ...
- sql server 条件 not in (null)总是false
SELECT 1 WHERE 2 NOT IN ( 1 ); 结果: (无列名) 1 SELECT 1 WHERE 2 NOT IN ( 1, NULL ); 结果:(无列名) ...
- Centos6---Fail2ban
1.安装: rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm yum -y install ...