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页面注册 ...
随机推荐
- LoadRunner-迭代和并发设置
迭代:指运行一次脚本时某段代码块(action)循环执行的次数,串行执行 并发:指同时运行脚本的次数,并行执行(多个用户同时跑) 以下是用例和对应的相关设置 Iterations是在Vuser Gen ...
- CH0102 64位整数乘法 数论
正解:数论/一个神仙想法 解题报告: 先放传送门qwq 两种方法,都还挺妙的就都写了qwq 第一种是快速幂 把b用二进制表示成,ck*2k+ck-1*2k-1+...+c0*20 然后就可以表示成,a ...
- 【虫师】【selenium】参数化
# 1 #coding=utf-8 from selenium import webdriver import os,time source = open("F:\\test\\info.t ...
- python 使用set对列表去重,并保持列表原来顺序
# python 使用set对列表去重,并保持列表原来顺序 list1 = ['cc', 'bbbb', 'afa', 'sss', 'bbbb', 'cc', 'shafa'] for item i ...
- mysql 操作sql语句 操作数据表中的内容/记录
#3. 操作文件中的内容/记录 往哪张表去插入 insert into 表名指定字段(id,name) 插入要加values(针对前面字段插入)(2,mike); insert into t1(id, ...
- Django +uwsgi+python3+nginx + mysql 部署
环境: 服务器ip:192.168.0.110 centos服务器 6.4 + mysql 5.6 + django1.11 +nginx 1.13.7 + uwsgi 2.0.18 uwsgi介绍 ...
- jmeter测试手机号码归属地
jmeter测试手机号码归属地接口时,HTTP请求有以下两种书写方法: 1.请求和参数一同写在路径中 2.参数单独写在参数列表中 请求方法既可以使用GET方法又可以使用POST方法. 注意:“服务器名 ...
- JavaScript加强
1.Aptana简介 Aptana是一个非常强大,开源,专注于JavaScript的Ajax开发IDE它的特性包括 1.JavaScript,JavaScript函数,HTML,CSS语言的Code ...
- [LeetCode] 72. Edit Distance_hard tag: Dynamic Programming
Given two words word1 and word2, find the minimum number of operations required to convert word1to w ...
- java数据结构经典问题
A:栈抽象数据类型 1.栈的主要操作 void push(int data);将data数据插入栈中. int pop();删除并返回最后一个插入栈的元素. 2.栈的辅助操作 int top();返回 ...