git把本地文件上传到github上的步骤
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上的步骤的更多相关文章
- Windows下如何将一个文件夹通过Git上传到GitHub上(转)
在通过windows系统的电脑上写代码,需要将项目上传到GitHub上去.比如在Pycharm上写Django后端,整个项目是一个文件夹的形式,那么怎么才能这个文件夹通过Git命令上传到GitHub上 ...
- idea git 把本地项目上传到github上
创建一个项目,在项目文件夹下执行以下命令 第二种方法: 先在idea上创建一个项目 注意以上只是在本地建立了本地仓库,代码都放在本地仓库. 现在上传到github上 到此才上传成功
- 如何通过TortoiseGit(小乌龟)把本地项目上传到github上
1.第一步: 安装git for windows(链接:https://gitforwindows.org/)一路next就好了, 如果遇到什么问题可以参考我另外一篇文章~^ - ^ 2.第二步:安装 ...
- 将本地的一个新项目上传到GitHub上新建的仓库中去
转载: 如何将本地的一个新项目上传到GitHub上新建的仓库中去 踩过的坑: 1.在git push时报错 error: RPC failed; curl 56 SSL read: error:000 ...
- 如何把项目上传到GitHub上
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Consolas; color: #a5b2b9 } span.Apple-tab-span ...
- 如何将自己写的代码上传到github上
忙活了一下午终于成功把代码上传到github上. 接下来就是我上传代码的步骤: ①首先注册github账号,登录,创建新仓库 ,点击+,点击new repository 得到如下页面,填写仓库名,自己 ...
- 将项目Demo上传到Github上的操作步骤
之前我有很多代码直接上传到了CSDN上,主要是因为操作方便,今天我就说说将源码Demo上传到Github上的操作步骤. 首先,你要先确定自己在Github上有自己的账户名,账户邮箱和密码.如果没有可以 ...
- 如何使用 PyCharm 将代码上传到GitHub上(详细图解)
说明:该篇博客是博主一字一码编写的,实属不易,请尊重原创,谢谢大家! 一丶说明 测试条件:需要有GitHub账号以及在本地安装了Git工具,无论是Linux环境还是Windows都是一样的 如果还没有 ...
- 在IDEA中搭建Java源码学习环境并上传到GitHub上
打开IDEA新建一个项目 创建一个最简单的Java项目即可 在项目命名填写该项目的名称,我这里写的项目名为Java_Source_Study 点击Finished,然后在项目的src目录下新建源码文件 ...
- Git随笔:尝试将本地工程上传至Github上的repository仓库,构建远端与本地协同的Git环境
上传工程至自己的Github公开库,步骤如下: 第1步:建立本地 git 仓库,cd 到你的本地项目根目录下,执行 git init 命令: 第2步:将本地项目工作区的所有文件添加到暂存区.小数点 & ...
随机推荐
- 四、YOLO-V1原理与实现(you only look once)
可以看成图像分类与定位的结合,给定一张图片,目标检测系统要能够识别出图片的目标并给出其位置,由于图片中目标数是不定的,且要给出目标的精确位置,目标检测相比分类任务更复杂.目标检测的一个实际应用场景就是 ...
- mysql更改密码与远程管理
set password = ': #在当前用户下更改密码 grant all privileges on *.* to root@"%" identified by " ...
- shell单引号屏蔽变量方法
[goforit ~]$ name="玖零後大叔" [goforit~]$ echo $name 玖零後大叔 [goforit ~]$ echo "$name" ...
- Spring Cloud学习笔记【八】服务网关 Zuul(过滤器)
在上篇文章中我们了解了 Spring Cloud Zuul 作为网关所具备的最基本功能:路由(Router),下面我们将关注 Spring Cloud Zuul 的另一核心功能:过滤器(Filter) ...
- 使用JEECG心得
使用JEECG心得 我就不做JEECG的介绍了,提供一个网址.能够更加清晰的了解JEECG文档. http://www.jeecg.org/book/jeecg_v3.html 用JEECG已经几乎相 ...
- C++语言笔记系列之十——静态成员
1.静态成员 (1)由keywordstatic修饰 静态变量定义语句在编译阶段就运行,运行过程中不再运行. (2)分类:静态数据成员.静态成员函数. (3)静态成员时类的全部对象共享的成员,而不是某 ...
- 基于express+redis高速实现实时在线用户数统计
作者:zhanhailiang 日期:2014-11-09 本文将介绍怎样基于express+redis高速实现实时在线用户数统计. 1. 在github.com上创建项目uv-tj.将其同步到本地: ...
- 维护的JSP站点数据丢失
两个月前换了份工作,然后接手了三台server.上面乱七八糟的网站和应用大把. 当中有维护一个瀚石苑:http://www.hanshiyuan.com/.三天两头的丢失数据. 都不知道怎么找回,好在 ...
- Lesson 2 Building your first web page: Part 2
Tag Diagram You may have noticed that HTML tags come in pairs; HTML has both an opening tag (<tag ...
- HDU 5438 Ponds dfs模拟
2015 ACM/ICPC Asia Regional Changchun Online 题意:n个池塘,删掉度数小于2的池塘,输出池塘数为奇数的连通块的池塘容量之和. 思路:两个dfs模拟就行了 # ...