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页面注册 ...
随机推荐
- pyobjc-framework-Cocoa 5.1.2
Introduction — PyObjC - the Python to Objective-C bridge https://pyobjc.readthedocs.io/en/latest/ py ...
- RuntimeError: Object: Could not open SDE workspace
客户环境,linux 终端里,使用arcpy.ListUsers() 报错:RuntimeError: Object: Could not open SDE workspace 经检查,问题在于 该机 ...
- 2018/04/04 每日一个Linux命令 之 ps
ps 用于查看系统内的进程状态. 这个命令比较重要,也比较长,会通过实践出常用的命令 -- 当我们敲下一个 ps 之后会发生什么? ubuntu@hong:~/nginx/sites-enabled$ ...
- function $(id) {}表示什么函数
function $(id) {}表示什么函数 一.总结 1.就是简写,不然每次打document.getElementById很烦 二.问题 function $(id) {return docum ...
- 【Jmeter】如何通过文件导入方式对用户名和密码进行参数化设置
JMeter 参数化 注意:param和data body只能用一个.所有任何一个里面有内容,切换都会报错,这不是问题,jmeter是这么设计的 方法一:通过添加CSV Data Set Config ...
- unittest数据驱动
所谓的数据驱动就是将数据单独存放,在写方法将数据读取,然后将读取的数据放在testcase里面. 当然如果这种testcase都是一样的,只有需要的数据不一样,也可以将testcase写成一个方法,把 ...
- 通用Dao方法
import java.lang.reflect.Field; import java.sql.Connection; import java.sql.DatabaseMetaData; import ...
- 全局修改composer源地址
查看 composer 主目录:通过 composer config -l -g 命令可以列出 composer 的全局配置信息,在这些信息中查找 [home] 配置项就是 composer 的主目录 ...
- mysql插入和更新时自动更新为当前时间
创建表的时候添加 CREATE TABLE `tmp` ( `id` varchar(32) NOT NULL, `update_time ` timestamp NOT NULL DEFAUL ...
- testng使用DataProvider+Excel实现DDT
DDT,即数据驱动测试 Data Driver Test,我曾经记录了一篇关于python的DDT框架(Excel+DDT数据驱动实例),那么java中的DDT是怎么样的呢?在java中,可以用tes ...