看了好多帖子,终于在混乱中找到自己适合的方法。。。。。。
自我感觉这个比较简单。 先安装本地git,官方下载地址:http://git-scm.com/download/  根据你自己的系统 下载对应版本。 Administrator@USER-20170816VX MINGW64 /g/project/10guang (桌面要提交的文件,右键选择git bash here)
$ git clone https://github.com/gaobing1252/web-app.git (使用仓库地址生成 web-app 目录,这个目录是在提交文件的里面,然后把文件里面要上传的内容都拷贝到生成的web-app下)
Cloning into 'web-app'...
warning: You appear to have cloned an empty repository. Administrator@USER-20170816VX MINGW64 /g/project/10guang
$ cd web-app (继续命令到web-app,从此处开始) Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git add . (注意这个 点 前面有空格的!)
warning: LF will be replaced by CRLF in home/home.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/jquery-1.6.2.min.js.
The file will have its original line endings in your working directory. Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git commit -m "提交文件"
[master (root-commit) fb02d25] 提交文件
93 files changed, 11020 insertions(+)
create mode 100644 .project
create mode 100644 css/easyLife/easyLife.css
create mode 100644 video/video.html
create mode 100644 "\346\226\207\346\241\243.txt" Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git remote add origin git@github.com:gaobing1252/web-app.git (origin 后面的地址是 ssh类型的,不是htttps!)
fatal: remote origin already exists. Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git push -u origin master
Username for 'https://github.com': gaobing1252 (输入用户名,之后会弹出密码输入框;验证成功自动上传)
Enumerating objects: 108, done.
Counting objects: 100% (108/108), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (102/102), done.
Writing objects: 100% (108/108), 1.40 MiB | 82.00 KiB/s, done.
Total 108 (delta 8), reused 0 (delta 0)
remote: Resolving deltas: 100% (8/8), done.
To https://github.com/gaobing1252/web-app.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.(成功!)

这个每次上传都要输入账号密码,还有另一种绑定秘钥的。可我生成了几次也没成功。。。。
感觉输入账号密码也不麻烦。

  

第一次使用Git上传本地项目到github的更多相关文章

  1. 第一次使用Git上传本地项目到github上

    对于程序原来说都听说过GitHub,GitHub有许多开源的的项目和一些前沿的技术.因为自己在刚刚开始使用Git把自己写的一些小dome放到GitHub上遇到许多的坑,这么长时间过去了,想对第一次使用 ...

  2. 用git上传本地项目到github上

    首先确认自己已经安装了git,打开git bash,输入ssh-keygen -t rsa -C "自己的邮箱地址@XXX.com" ,生成自己的公钥与私钥   一路默认回车,会生 ...

  3. 第一次Git上传本地项目到github上 的命令

    1.下载Git软件:https://git-scm.com/downloads, 2.下载之后安装就很简单了, 3.邮箱注册 在git bash界面输入如下内容即可完成邮箱的注册: $ git con ...

  4. git上传本地项目到github

    git软件下载地址:https://git-scm.com/download/ 1. 在GitHub上建立项目登录GitHub后,你可以在右边靠中那里找到一个按钮“New Repository”,点击 ...

  5. 【转】如何使用Git上传本地项目到github?(mac版)

    原文链接:http://www.cnblogs.com/lijiayi/p/pushtogithub.html 在此假设你已经在 github 上创建好了一个项目,像这样: 并且你已经完成了自己的项目 ...

  6. 【 js 工具 】如何使用Git上传本地项目到github?(mac版)

    在此假设你已经在 github 上创建好了一个项目,像这样: 并且你已经完成了自己的项目代码, 同时你也已经安装了 git,然后 let's start. 首先,建一个文件夹比如文中演示的是 微信小程 ...

  7. Git 上传本地项目到Github

    前提: 安装Git 注册并拥有Github账号 目录: 初始化本地目录位Git仓库 Github上创建仓库 本地生成SSH key,并添加到Github上 本地项目管理Github上远程项目 详细步骤 ...

  8. 转:git上传本地项目到github

    转自:https://blog.csdn.net/Lucky_LXG/article/details/77849212 将本地项目上传到Github(两种简单.方便的方法) 一.第一种方法:首先你需要 ...

  9. git上传本地项目到github,方法2

    第一步:去github上创建自己的Repository,创建页面如下图所示: 填写相应信息后点击create即可 Repository name: 仓库名称 Description(可选): 仓库描述 ...

随机推荐

  1. 节点nodeName与nodeValue表

  2. Sharepoint 2013企业内容管理学习笔记(一) 半自动化内容管理

    大家好,今天我来与大家分享一个关于sharepoint2013文档管理方面的一个知识,我相信也许早就有人了解并熟知这项技术了,呵呵,众所周知,sharepoint 有一个很亮的功能,什么?没错,就是文 ...

  3. 使用putty远程登录Ubuntu时,报Network error:Connection refused错误

    putty远程登录Ubuntu,弹出Network error:Connection refused的错误提示框,就是因为Ubuuntu没有安装ssh服务.执行命令: sudo apt-get ins ...

  4. linux c开发: 在程序退出时进行处理

    有时候,希望程序退出时能进行一些处理,比如保存状态,释放一些资源.c语言开发的linux程序,有可能正常退出(exit),有可能异常crash,而异常crash可能是响应了某信号的默认处理.这里总结一 ...

  5. 基于k8s的ES集群定期删除索引

    apiVersion: batch/v1beta1 kind: CronJob metadata: name: elasticsearch namespace: elasticsearch label ...

  6. Struts2学习-拦截器2

    1.做一个登陆页面(loginView.jsp,才用Action来访问),2.登陆成功后,可以跳转到系统的首页(index.jsp),3.首页有一个链接(testOtherAction访问其它的功能模 ...

  7. react-webpack-express

    这是一个整合react express 实现前后台交互,并且采用webpack进行打包和解析文件.其实react官方有一个脚手架create react app,也可以看那个,但是这个脚手架webpa ...

  8. makefile 编译指定目录

    makefile 编译指定目录 sub1=test1 sub2=test2 subs = sub1 sub2 SUBDIRS =$(foreach i, $(subs), $($(i))) .PHON ...

  9. IOS6 的特性 及 autoalyout的作用

    1.如果控件有默认的内容(宽高), 我们只需设置autoalyout的X/Y, autolayout会自动计算出宽高 2.Xcode6将Storyboard变成豆腐干的目的:在Xcode6之前, 如果 ...

  10. PowerShell批量创建文件夹

    效果如下: 实现关键: mkdir (1..10|%{"hwllo$_"}) 过程概述: