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页面注册 ...
随机推荐
- CyanogenMod---android
http://blog.csdn.net/sheldon4090/article/details/7736957--service. android进程间通信:使用AIDL http://blog.c ...
- django模板语言的注释
就像HTML或者Python,Django模板语言同样提供代码注释. 注释使用 {# #} : ? 1 {# This is a comment #} 注释的内容不会在模板渲染时输出. 用这种语法的注 ...
- java进程和线程的区别
什么是进程,什么是线程系统要做一件事,运行一个任务,所有运行的任务通常就是一个程序:每个运行中的程序就是一个进程,这一点在任务管理器上面可以形象的看到.当一个程序运行时,内部可能会包含多个顺序执行流, ...
- (3.11)mysql基础深入——mysql文件分类与配置文件管理
(3.11)mysql基础深入——mysql文件分类与管理 关键词:mysql配置文件,mysql参数文件,mysql中的my.cnf 目录:mysql数据库文件分类: [1]参数文件:my.cnf ...
- linux平台mysql密码设置
登录mysql默认没有指定账号 查看默认账号是谁 select user(); mysql> select user();+----------------+| user() |+------- ...
- __import__ 与动态加载 python module
原文出处: koala bear Direct use of __import__() is rare, except in cases where you want to import a m ...
- [PAT]A+B Format[简单]
1001 A+B Format (20)(20 分) Calculate a + b and output the sum in standard format -- that is, the dig ...
- Ubuntu16.04 安装 “宋体,微软雅黑,Consolas雅黑混合版编程字体” 等 Windows 7 下的字体
Windows平台下,“宋体”.“微软雅黑”.“Courier New(编程字体)”用的比较多,看的也习惯了.那如何在 Ubuntu下也安装这些字体呢? 操作步骤如下: 第一步:从 Windows 7 ...
- nodejs 将网上的图片下载到本地文件
var request = require('request'); var fs = require('fs'); var img_src = 'https://www.baidu.com/img/b ...
- c#图像灰度化、灰度反转、二值化
图像灰度化:将彩色图像转化成为灰度图像的过程成为图像的灰度化处理.彩色图像中的每个像素的颜色有R.G.B三个分量决定,而每个分量有255中值可取,这样一个像素点可以有1600多万(255*255*25 ...