github客户端上传代码
在window下安装github客户端上传代码
第一步:创建Github新账户
第二步:新建仓库
第三步:安装Github shell程序,地址:http://windows.github.com/
第四步:打开Git Shell,输入以下命令生成密钥来验证身份
$ ssh-keygen -C 'your@email.address' -t rsa
连续三个回车之后会在windows当前用户目录下生成.ssh文件夹,和linux一样。
第五步:在Git Shell下输入命令测试刚才的公钥是否认证正确。
$ ssh -T git@github.com
第六步:clone刚才新建的repository 到本地,输入命令:
git clone https://github.com/XXXXX/XXXXXX.git
第七步:将想上传的代码目录拷贝到此文件夹下:
第八步:切换到Git shell 命令行下,输入命令:
git init
git add .
git commit -m 'xxxxxx'
git remote add origin https://github.com/xxxxx/xxxxx.git
git push origin master
(1)如果执行git remote add origin https://github.com/xxxxx/xxxxx.git,出现错误:
fatal:remote origin already exists
则执行以下语句:
git remote rm origin
再往后执行git remote add origin https://github.com/xxxxx/xxxxx.git即可。
(2)在执行git push origin master时,报错:
$ git push origin master
To https://github.com/qq20707/DesignPatterns.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/qq20707/DesignPatterns.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
error:failed to push som refs to .....
则执行以下语句:git pull --rebase origin master
(3)如果出现错误 “refusing to merge unrelated histories”
git pull origin master --allow-unrelated-histories
先把远程服务器github上面的文件拉先来,再push 上去。
github客户端上传代码的更多相关文章
- 本地项目通过github客户端上传到github网站上
一.github客户端上传步骤 一.github客户端上传步骤1.百度搜索关键字: GitHub 离线安装包 ==> Github_3.3.4.0版本链接:https://pan.baidu.c ...
- Github如何上传代码?
Github如何上传代码? 第一步:创建Github新账户 第二步:新建仓库 第三部:填写名称,简介(可选),勾选Initialize this repository with a README选项, ...
- github从上传代码到发布静态网站
1.上传代码 第一步:建立git仓库 cd到你的本地项目根目录下,执行git命令 git init 第二步:将项目的所有文件添加到仓库中 git add . 如果想添加某个特定的文件,只需把.换成特定 ...
- 使用github客户端上传文件(瓜皮教程)
因为栋哥的课才接触道github这个东西,离第一次接触大概有一年左右了吧,记得不是太清楚了,但是,直到前几天前我还是不知道如何配置,利用git上传文件,之前也是叫同学帮忙弄得,但是这次软工实践要频繁用 ...
- 201709012工作日记--一台电脑创建两个Github账户上传代码
1. 在一台主机上面使用多个GitHub账号 有时候,我们需要将个人账号和公司账号区分,这时候我们就会需要在一台电脑上使用2个不同的git账号. 2. 上传文件 http://blog.csdn.ne ...
- github如何上传代码
别人写的太好了,没必要重写.备份给自己参看. 1.https://www.cnblogs.com/zlxbky/p/7727895.html 2.https://blog.csdn.net/pql92 ...
- windows上传代码到github
上传代码到github上有很多种方法,在这里我介绍一种比较简单的一种.工具嘛,越简单越好用啊. 1.首先下载github在windows下的客户端 下载地址:https://desktop.githu ...
- Git安装与上传代码至Github
转载请注明出处:http://www.cnblogs.com/cnwutianhao/p/6642887.html 这篇文章应该是全网最新,最全,最靠谱的Github安装到上传代码的流程. 1.Git ...
- 如何用git上传代码到github详细步骤
注册账户 这个小菜鸟带着心跳写的第一篇博客! 还请大家多多提点! 想使用github,第一步肯定是要注册github账号,有了账号就是直接登录啦 可以直接打开http://github.com页面注册 ...
随机推荐
- kafka配置文件注解
若advertised.host.name的值是aa,则kafka发布的服务名也要是aa kafka log.cleanup.policy=delete 日志清理策略 log.retention.ho ...
- 看病要排队--hdu1873
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1873 运用优先队列写就行了 #include<stdio.h> #include< ...
- Arctic Network---poj2349 最小生成树
http://poj.org/problem?id=2349 题意:有n个点给出坐标,点和点之间可以用无线电或者卫星通信,每个点都有无线电收发器可进行无线电通信,但是只有m个点有卫星通信功能.卫星通信 ...
- ubuntu 下关闭apache服务自动启动
最近在自己的ubuntu安装了apache服务器,每次开机的时候通过: ps -A 命令发现apache服务总是自动启动,如下: 本来自己的电脑内存就小,现在也不用这个服务,所以想让apa ...
- 虫师的性能测试思想html网页学习
http://www.cnblogs.com/fnng/category/387349.html
- 开机自启:bat实现一次性打开win7中的常用软件和文件夹
需求说明: 我们电脑(windows)办公,经常上班前一开机,就要手动打开很多文件夹和程序. 想节省时间,一键打开常用的文件夹和程序,研究了一下bat命令,于是mystart.bat产生了. myst ...
- chown 命令
root@localhost ~]# .txt # 同时修改文件属主和属组 !chown 执行上一个chown命令
- 浅析I/O处理过程与存储性能的关系
浅析I/O处理过程与存储性能的关系 https://community.emc.com/docs/DOC-28653 性能”这个词可以说伴随着整个IT行业的发展,每次新的技术出现,从硬件到软件大多数情 ...
- [py]flask从0到1-模板/增删改查
flask知识点 1.后端渲染html到前端 render_template 2.后端获取前端数据 request.args.get 3.前端获取后端数据 模板 4.警示消息 flash {{ get ...
- IP设置-内置服务器-外置服务器
HBulider 中 运行 -> 设置web服务器 -> 内置服务器将 127.0.0.1 换为局域网的ip,可以在局域网内所有电脑,手机上浏览页面.但是只能浏览html,php asp等 ...