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. caffe(13) 数据可视化(python接口)配置

    caffe程序是由c++语言写的,本身是不带数据可视化功能的.只能借助其它的库或接口,如opencv, python或matlab.大部分人使用python接口来进行可视化,因为python出了个比较 ...

  2. NodeJS学习笔记 进阶 (3)Nodejs 进阶:Express 常用中间件 body-parser 实现解析(ok)

    个人总结:Node.js处理post表单需要body-parser,这篇文章进行了详细的讲解. 摘选自网络 写在前面 body-parser是非常常用的一个express中间件,作用是对http请求体 ...

  3. P1872 回文串计数(回文树)

    题目描述 小a虽然是一名理科生,但他常常称自己是一名真正的文科生.不知为何,他对于背诵总有一种莫名其妙的热爱,这也促使他走向了以记忆量大而闻名的生物竞赛.然而,他很快发现这并不能满足他热爱背诵的心,但 ...

  4. poj 3261 后缀数组 找反复出现k次的子串(子串能够重叠)

    题目:http://poj.org/problem?id=3261 仍然是后缀数组的典型应用----后缀数组+lcp+二分 做的蛮顺的,1A 可是大部分时间是在调试代码.由于模板的全局变量用混了,而自 ...

  5. Mesh BRep Shapes

    Mesh BRep Shapes eryar@163.com Abstract. 当对OpenCASCADE的BRep表示法的数据结构有了一定的理解后,建议可以自己实现一个显示数据生成的功能,即网格剖 ...

  6. android selector设置button点击效果(具体)以及常见问题

    button的点击效果学习起来其实比較easy,此点对开发人员来说也是使用的比較频繁的一个知识点,与它相关的还有编辑框的获取焦点时改变背景颜色.选择button选择时改变字体颜色等等.这些其实都是用到 ...

  7. VC双缓冲画图技术介绍

    双缓冲画图,它是一种主要的图形图像画图技术.首先,它在内存中创建一个与屏幕画图区域一致的对象,然后将图形绘制到内存中的这个对象上,最后把这个对象上的图形数据一次性地拷贝并显示到屏幕上. 这样的技术能够 ...

  8. 在Unix上用 BIND建立名称服务器(naem server)

    在Unix上用 BIND建立名称服务器(naem server) 安装 apt install -y bind9 yum install -y bind bind-utils 下载源码并解压缩,htt ...

  9. git如何从远程非master分支更新到本地对应分支

    git如何从远程非master分支更新到本地对应分支 自己实例 正确步骤 如果本地有分支,那就删除本地分支 删除本地分支::git branch -d 2018_4_18_second 切换分支: g ...

  10. 5. webservice通信调用天气预报接口实例

    转自:https://blog.csdn.net/xiejuan6105/article/details/78452605 一:环境搭建 1:新建一个java project工程weatherInf ...