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
最新文章
- java4
- Linux内核--网络栈实现分析(二)--数据包的传递过程(上)
- a与a:link、a:visited、a:hover、a:active
- linux mysql5.5安装与配置(转帖,在网上收集,自用)
- 跟我一起Django - 01 安装和初始化
- c++ 时间格式化
- jquery mobile validation
- [置顶] SpecDD系列:“完成” 的定义
- Eclipse在点击运行后不能自动保存的解决
- VMWare Workstation虚拟机 安装Centos7 图文指南
- python3 集合(set)
- scanf函数的返回值
- UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte
- MySQL之实现Oracle中的rank()函数的功能
- dubbo支持哪些通信协议和序列化协议
- node和npm的安装和镜像源的修改
- trinitycore 魔兽服务器源码分析(三) 多线程相关
- 《Python》 文件操作
- gitlab 启用HTTPS
- Oracle EBS PO 接受入库
热门文章
- [转]linux,windows 可执行文件(ELF、PE)
- BZOJ1433 ZJOI2009 假期的宿舍 二分图匹配
- 求第K大数
- Maximum Depth of Binary Tree
- 2015年我国IT行业发展趋势分析(转)
- html5 EvnetSource 与 JSP页面结合使用
- 10天学会phpWeChat——第四天:大U函数U()的使用
- HelloWorld[Java]
- JAVA课程体系
- 罗辑思维(罗胖)阿瑟&#183;黑利书:《大饭店》、《晚间新闻》、《超载》、《最后诊断》、《钱商》、《身高居位》电子书 pdf和mobi格式得到下载