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步:将本地项目工作区的所有文件添加到暂存区.小数点 & ...
随机推荐
- php文件加载、错误处理、方法函数和数组
数组运算符注意:php中,数组的元素的顺序,不是由下标(键名)决定的,而是完全由加入的顺序来决定.联合(+):将右边的数组项合并到左边数组的后面,得到一个新数组.如有重复键,则结果以左边的为准$v1 ...
- TP5 模板渲染语法
每次都要去网上找,又发现都不全.所以自己记录一下 volist:循环 {volist name="collection" id="v"} {/volist} i ...
- 洛谷1073 NOIP2009 最优贸易
题目大意 C 国有 n 个大城市和 m 条道路,每条道路连接这 n 个城市中的某两个城市.任意两个城市之间最多只有一条道路直接相连.这 m 条道路中有一部分为单向通行的道路,一部分为双向通行的道路,双 ...
- LNMP安装部署开源IP管理工具phpipam
1.数据库 mariadb 安装 //依赖安装 yum install -y apr* autoconf automake bison bzip2 bzip2* compat* \ cpp curl ...
- center os 7最小化安装后按table无法补全命令的问题
闲来无趣,这两天huskiesir又重新安装了下center os 7操作系统,结果呢,发现一个问题:按table键无法补全命令啊. 咦,奇怪了,这次怎么回事,完全没遇到过啊.哦,回想了一下,和以往的 ...
- 【Codeforces Round #420 (Div. 2) A】Okabe and Future Gadget Laboratory
[题目链接]:http://codeforces.com/contest/821/problem/A [题意] 给你一个n*n的数组; 然后问你,是不是每个位置(x,y); 都能找到一个同一行的元素q ...
- 零基础学python-3.3 标识符
1.标识符的组成 1)有数字.下划线.英文字母组成 2)第一个字符仅仅能是字母或者下划线 3)大写和小写敏感 标识符通常是变量名称.方法名.类名等 2.keyword python里面有一系列的关键字 ...
- LicManager系统对各license类型终端客户机器的监控
与catia软件相似.以下这些软件都是汽车project设计软件.对汽车工业的的研发设计有着不可替代的作用.但它们都有着不同于各自的优势与不足之处. 可是在LicManager许可监控系统下,它们都是 ...
- lightoj--1043-- Triangle Partitioning (水题)
Triangle Partitioning Time Limit: 500MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu S ...
- java实习生的成长之路<转>
首先初识语法的阶段,必须要学会怎么操作对象,操作if和for,操作list set map,然后是线程.IO和jdbc什么的,其余的,若是一时不理解,可以后边需要时再学. 这阶段完了,你可以写些能在控 ...