前提是你已经有了自己的github账号,并且已经关联了本地和远程的仓库,设置好了ssh密钥。自行百度解决。

上传的主要命令:

git init 

git add .

git commit -m "备注的信息"

//关联到远程的仓库

git remote add origin https://github.com/Alanrah/WebGL-.git

//上传到远程仓库

 git push origin master

这是我的上传大致的过程,有兴趣可以看看。

// MyHtmlCss是我要上传的文件的目录,目录下是要上传的文件
Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/FrontEndSrc/MyHtmlCss (master)
$ git init
Initialized existing Git repository in D:/FronteEnd/FrontEndSrc/MyHtmlCss/.git/ Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/FrontEndSrc/MyHtmlCss (master)
$ git add .(注意,add后面是空格和点号) Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/FrontEndSrc/MyHtmlCss (master)
$ git remote add origin https://github.com/Alanrah/MyHtmlCSS.git Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/FrontEndSrc/MyHtmlCss (master)
$ git commit -m "my first commit myhtmlcss"(引号内为本次上传的信息)
[master (root-commit) 2dd1125] my first commit myhtmlcss
60 files changed, 4618 insertions(+)
create mode 100644 "CSS3-\345\270\246\350\203\214\346\231\257\345\210\207\346\215\242\347\231\273\351\231\206\346\263\250\345\206\214\350\241\250\345\215\225/css/style.css"
…… create mode 100644 "\346\226\207\346\234\254\345\212\240\345\257\206.html"
create mode 100644 "\347\273\277\350\217\212.html"
create mode 100644 "\351\227\252\347\203\201\350\255\246\347\244\272\347\201\257.htm" Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/FrontEndSrc/MyHtmlCss (master)
$ git push origin master
Counting objects: 82, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (74/74), done.
Writing objects: 100% (82/82), 621.91 KiB | 0 bytes/s, done.
Total 82 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), done.
To https://github.com/Alanrah/MyHtmlCSS.git
* [new branch] master -> master Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/FrontEndSrc/MyHtmlCss (master)
$ //ok,到这里该仓库上传完毕 //现在以同样的方法上传仓库: Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/WebGL/webGL中文网站基础教程学习
$ git init
Initialized empty Git repository in D:/FronteEnd/WebGL/webGL中文网站基础教程学习/.git/ Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/WebGL/webGL中文网站基础教程学习 (master)
$ git add .
warning: LF will be replaced by CRLF in js/d3.js.
The file will have its original line endings in your working directory.
The file will have its original line endings in your working directory.
……
warning: LF will be replaced by CRLF in src/lesson15/index.html.
The file will have its original line endings in your working directory. Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/WebGL/webGL中文网站基础教程学习 (master)
$ git commit -m "WebGL中文教程代码"
[master (root-commit) 858abfa] WebGL中文教程代码
69 files changed, 140515 insertions(+)
create mode 100644 js/d3.js
create mode 100644 js/three.min.js
……
create mode 100644 src/nehe.gif
create mode 100644 "three.js\347\232\204\350\207\252\345\255\246\345\237\272\347\241\200.doc" Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/WebGL/webGL中文网站基础教程学习 (master)
$ git remote add origin https://github.com/Alanrah/WebGL-.git Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/WebGL/webGL中文网站基础教程学习 (master)
$ git push origin master
Counting objects: 74, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (71/71), done.
Writing objects: 100% (74/74), 5.31 MiB | 145.00 KiB/s, done.
Total 74 (delta 13), reused 0 (delta 0)
remote: Resolving deltas: 100% (13/13), done.
To https://github.com/Alanrah/WebGL-.git
* [new branch] master -> master Catherine@DESKTOP-GP6IPQS MINGW64 /d/FronteEnd/WebGL/webGL中文网站基础教程学习 (master)
$

github上传本地仓库的更多相关文章

  1. github上传本地项目

    github上传本地项目,分为两个部分: 1.如果建立了ssh key的,直接看第二部分的上传部分就行了 2.如果没有建立ssh key的,就从头开始看吧 ——————————————————我是快乐 ...

  2. 通过git shell 在Github上传本地项目

    首先现在github上新建一个库,再进行如下操作,过程不赘述 1.打开git shell 2.cd到项目位置       // cd archives-vue 3.git init 4.Get add ...

  3. Git上传本地仓库项目到gitee远程仓库(命令篇)

    前言:最近整理了一下自己之前的自学代码,包括一些练习的项目.发现有些杂乱,故想使用Gitte(码云)管理.加上不少公司使用Git,所以写了这篇文章记录. 如果我们本地有了项目,那么如何上传到码云上呢? ...

  4. 使用Git GUI工具 上传本地仓库到 gitee码云仓库

    前言: 网上关于git的命令操作与使用很多教程和博客,在使用git工具时我发现有一个 git Gui 可视化工具,我觉得十分的亲切,由于我之前一直是使用svn作为版本控制管理工具,都是可视化操作,使用 ...

  5. GIT的使用(Gitlab上传本地仓库代码,Webstorm修改更新)

    准备:GIT的安装,Gitlab账户登陆,webstorm的安装 1.首先,你得先会在Gitlab中创建一个团体,在团体中创建一个项目,先建组,再建项目,网上哪里都有教程,随便找了个网址: https ...

  6. Git上传本地仓库文件到Gitee(Github同理)

    前言:本来想把最近的代码更新到Github上,但是校园网打不开,于是决定暂时先更新到Gitee中,Github中的操作也同理. 1. 创建云仓库: 就是在Gitee/Github上创建仓库,这里不演示 ...

  7. GitHub上传本地文件

    基本条件:安装GitHub,安装成功之后:(windows系统) 1.安装完成后,还需要一步设置,在命令行输入: $ git config --global user.name "Your ...

  8. 使用Git Bash向GitHub上传本地项目

    第一步:下载Git Bash(https://gitforwindows.org/),安装的过程是一路下一步,就不细说啦: 第二步:打开Git Bash,如下图显示: 第三步:现在让我们先放一放Git ...

  9. github上传本地项目代码

    进入github首页,点击新项目new repository,如下图所示: 然后进入如下页面,填写信息: 最后点击Create repository,生成如下页面: 红色圈圈画的步骤,先点击Clone ...

随机推荐

  1. 【转载】 火爆的996.ICU项目正在酝酿开源许可证 禁止996公司使用

    原文地址: https://www.cnbeta.com/articles/tech/832449.htm ---------------------------------------------- ...

  2. Putty CentOS SSH 总是自动断开连接

    /********************************************************************** * Putty CentOS SSH 总是自动断开连接 ...

  3. [LeetCode&Python] Problem 169. Majority Element

    Given an array of size n, find the majority element. The majority element is the element that appear ...

  4. Java设计模式(一)

    1.什么是设计模式? 在软件工程中,设计模式是对软件设计中普遍存在的各种问题,所提出的 解决方案. 换句话说,设计模式是一套被反复使用.多数人知晓的.经过分类的.代码设计的 经验的总结.使用设计模式是 ...

  5. linux 的压缩 打包

    1.压缩打包,常见的命令:gzip bzip2 xz zip tar gzip:  不能压缩目录 gip  -[0-9]  file_name   压缩级别, 默认是6 gzip  file_nane ...

  6. Fedora瘦身

    启用的服务 systemctl list-unit-files --type=service | grep enabled 所有服务 systemctl list-unit-files --type= ...

  7. python str使用笔记(更新)

    判断字符串是否以某个串为结尾: str.endswith(strtmp) 返回True/False >>> strs='aba' >>> strs.endswith ...

  8. js判断输入的字符是否是汉字

    <script type="text/javascript"> var c=prompt("请输入一个字符"); var isNumber = c& ...

  9. python基础(五)——CGI编程

    使用python实现get方法和post方法传值,多选按钮,单选按钮.文本编辑区.下拉列表数据的传递,cookie的设置文件上传,文件下载.本文未经整理,仅供参考 #!/usr/bin/python ...

  10. C++中的ravalue学习笔记

    一.学习笔记 1. A a = 42; 会先以42为参数构造一个A类对象,然后调用拷贝构造函数来构造a,目前编译器优化掉了拷贝构造函数的调用,测试拷贝构造函数是没有被调用的,但是其权限不能为priva ...