1.清除clean

2.返回上一级cd ..

3.克隆仓库地址git clone+地址

4.添加忽悠文件vim .gitignore

5查看cat .gitignore

6.进入到test,并且添加所有的文件:cd test    git add.

7.查看状态,绿色git status

8.提交git commit  -am "wangtingwx"

9.查看状态

10.放到github:   ----------git  push origin master

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/weixin

$ clean

bash: clean: command not found

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/weixin

$ clear

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/weixin

$ cd ..

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects

$ git clone https://github.com/wangxiaoting666/test.git

Cloning into 'test'...

warning: You appear to have cloned an empty repository.

Checking connectivity... done.

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects

$ vim .gitignore

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects

$ cat .gitignore

node_modules

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects

$ cd test

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)

$ git add .

warning: LF will be replaced by CRLF in node_modules/.bin/mime.

The file will have its original line endings in your working directory.

warning: LF will be replaced by CRLF in node_modules/accepts/HISTORY.md.

The file will have its original line endings in your working directory.

warning: LF will be replaced by CRLF in node_modules/accepts/LICENSE.

The file will have its original line endings in your working directory.

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)

$ git status

On branch master

Initial commit

Changes to be committed:

(use "git rm --cached ..." to unstage)

new file:   .project

new file:   node_modules/.bin/mime

new file:   node_modules/.bin/mime.cmd

new file:   node_modules/accepts/HISTORY.md

new file:   node_modules/accepts/LICENSE

new file:   node_modules/accepts/README.md

new file:   node_modules/accepts/index.js

new file:   node_modules/accepts/package.json

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)

$ git commit -am "wangtingwx"

[master (root-commit) 93dfc21] wangtingwx

warning: LF will be replaced by CRLF in node_modules/.bin/mime.

The file will have its original line endings in your working directory.

warning: LF will be replaced by CRLF in node_modules/accepts/HISTORY.md.

The file will have its original line endings in your working directory.

warning: LF will be replaced by CRLF in node_modules/accepts/LICENSE.

The file will have its original line endings in your working directory.

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)

$ git status

On branch master

Your branch is based on 'origin/master', but the upstream is gone.

(use "git branch --unset-upstream" to fixup)

nothing to commit, working directory clean

Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)

$ git push origin master

Username for 'https://github.com': wangxiaoting666

Counting objects: 314, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (302/302), done.

Writing objects: 100% (314/314), 284.07 KiB | 0 bytes/s, done.

Total 314 (delta 65), reused 0 (delta 0)

remote: Resolving deltas: 100% (65/65), done.

To https://github.com/wangxiaoting666/test.git

* [new branch]      master -> master

原文作者:祈澈姑娘

技术博客:https://www.jianshu.com/u/05f416aefbe1

90后前端妹子,爱编程,爱运营,爱折腾。

坚持总结工作中遇到的技术问题,坚持记录工作中所所思所见,欢迎大家一起探讨交流。

文末福利:关注「编程微刊」公众号 ,在微信后台回复「领取资源」,获取IT资源200G干货大全。公众号回复“1”,拉你进程序员技术讨论群

git把本地文件上传到github上的步骤的更多相关文章

  1. Windows下如何将一个文件夹通过Git上传到GitHub上(转)

    在通过windows系统的电脑上写代码,需要将项目上传到GitHub上去.比如在Pycharm上写Django后端,整个项目是一个文件夹的形式,那么怎么才能这个文件夹通过Git命令上传到GitHub上 ...

  2. idea git 把本地项目上传到github上

    创建一个项目,在项目文件夹下执行以下命令 第二种方法: 先在idea上创建一个项目 注意以上只是在本地建立了本地仓库,代码都放在本地仓库. 现在上传到github上 到此才上传成功

  3. 如何通过TortoiseGit(小乌龟)把本地项目上传到github上

    1.第一步: 安装git for windows(链接:https://gitforwindows.org/)一路next就好了, 如果遇到什么问题可以参考我另外一篇文章~^ - ^ 2.第二步:安装 ...

  4. 将本地的一个新项目上传到GitHub上新建的仓库中去

    转载: 如何将本地的一个新项目上传到GitHub上新建的仓库中去 踩过的坑: 1.在git push时报错 error: RPC failed; curl 56 SSL read: error:000 ...

  5. 如何把项目上传到GitHub上

    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Consolas; color: #a5b2b9 } span.Apple-tab-span ...

  6. 如何将自己写的代码上传到github上

    忙活了一下午终于成功把代码上传到github上. 接下来就是我上传代码的步骤: ①首先注册github账号,登录,创建新仓库 ,点击+,点击new repository 得到如下页面,填写仓库名,自己 ...

  7. 将项目Demo上传到Github上的操作步骤

    之前我有很多代码直接上传到了CSDN上,主要是因为操作方便,今天我就说说将源码Demo上传到Github上的操作步骤. 首先,你要先确定自己在Github上有自己的账户名,账户邮箱和密码.如果没有可以 ...

  8. 如何使用 PyCharm 将代码上传到GitHub上(详细图解)

    说明:该篇博客是博主一字一码编写的,实属不易,请尊重原创,谢谢大家! 一丶说明 测试条件:需要有GitHub账号以及在本地安装了Git工具,无论是Linux环境还是Windows都是一样的 如果还没有 ...

  9. 在IDEA中搭建Java源码学习环境并上传到GitHub上

    打开IDEA新建一个项目 创建一个最简单的Java项目即可 在项目命名填写该项目的名称,我这里写的项目名为Java_Source_Study 点击Finished,然后在项目的src目录下新建源码文件 ...

  10. Git随笔:尝试将本地工程上传至Github上的repository仓库,构建远端与本地协同的Git环境

    上传工程至自己的Github公开库,步骤如下: 第1步:建立本地 git 仓库,cd 到你的本地项目根目录下,执行 git init 命令: 第2步:将本地项目工作区的所有文件添加到暂存区.小数点 & ...

随机推荐

  1. 开源映射平台Mapzen加入了Linux基金会的项目

    2019年1月29日,Linux基金会宣布,开源映射平台Mapzen现在是Linux基金会项目的一部分. Mapzen专注于地图显示的核心组件,如搜索和导航.它为开发人员提供了易于访问的开放软件和数据 ...

  2. 使用let's encrypt为你的Ubuntu14+nginx网站保驾护航!

    finch最近正在研究一个新的网站系统,闲的没事想搞搞ssl,结果搞了两天,遇到很多问题,现在记录并分享一下经验. 环境之前搭建好了是Ubuntu14+nginx+php5+mysql 现在开始使用l ...

  3. Xshell查看日志的基础使用

    2018\11\26 下载安装不多说,官网免费版即可,附上链接:https://www.netsarang.com/products/xsh_overview.html 打开后新建连接,输入主机ip即 ...

  4. celery 学习

    1. 列出计划的ETA任务(worker) celery -A proj inspect scheduled 参考文档:http://docs.celeryproject.org/en/latest/ ...

  5. 删除小脚本 srm

    提示:只能删除当前路径下的目录或文件 #!/bin/bash #将测试好的脚本,拷贝到 $PATH 能够搜索到目录下.并且改名 例如: /usr/local/bin cp /test/srm.sh / ...

  6. python -迭代器与生成器 以及 iterable(可迭代对象)、yield语句

    我刚开始学习编程没多久,对于很多知识还完全不知道,而有些知道的也是一知半解,我想把学习到的知识记录下来,一是弥补记忆力差的毛病,二也是为了待以后知识能进一步理解透彻时再回来做一个补充. 参考链接: 完 ...

  7. 紫书 例题 10-10 UVa 10491(概率计算)

    公式很好推,表示被高中生物遗传概率计算虐过的人 这个公式简直不需要动脑 #include<cstdio> using namespace std; int main() { double ...

  8. [NOIP1999]进制位(搜索)

    P1013 进制位 题目描述 著名科学家卢斯为了检查学生对进位制的理解,他给出了如下的一张加法表,表中的字母代表数字. 例如: + L K V E L L K V E K K V E KL V V E ...

  9. 适用于OpenGL离屏渲染上下文的初始化代码

    说明 近期做图像算法.须要用到shader对图像进行处理,用glut会有窗体,不适合写成UT測试用例,须要创建一个无窗体的OpenGL上下文. 代码 这部分代码事实上是參考 Android的Skia ...

  10. 浏览器Console创建canvas base64 png图片

    火狐中运行:console.log var canvas = document.createElement('canvas'); canvas.width =1 canvas.height =1 ca ...