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步:将本地项目工作区的所有文件添加到暂存区.小数点 & ...
随机推荐
- HDU-1069 Monkey and Banana DAG上的动态规划
题目链接:https://cn.vjudge.net/problem/HDU-1069 题意 给出n种箱子的长宽高 现要搭出最高的箱子塔,使每个箱子的长宽严格小于底下的箱子的长宽,每种箱子数量不限 问 ...
- Ubuntu命令行快捷启动Pycharm
我pycharm安装目录为/home/dell/pycharm-community-2018.1.2/bin.那么安装完成之后系统不会给pycharm添加系统路径,只有把终端切换到安装目录/home/ ...
- Win10 +VS2015 配置openCV3.4.0
配置过程参考链接:https://www.cnblogs.com/linshuhe/p/5764394.html 其他链接:https://blog.csdn.net/weixin_39393712/ ...
- subline Text3 插件安装
--没有解决,换了vscode 安装Package Control 这是必须的步骤,安装任何插件之前需要安装这个 自动安装的方法最方便,只需要在控制台(不是win的控制台,而是subline 的)里粘 ...
- leetcode笔记:Range Sum Query - Mutable
一. 题目描写叙述 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), ...
- TRIZ系列-创新原理-7-嵌套原理
原理表述例如以下: 1)把一个物体嵌入另外一个物体.然后将这两个物体再嵌入第三个物体,以此类推. 这个原理又叫俄罗斯娃原理,目的是在不影响原有功能的情况下: A) 在须要时.能够降低系统的体积和便于携 ...
- vue2.0-transition多个元素
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- vim 脚本之快捷注释
今天初步学习了下vim的脚本知识,并尝试写了一个简单的脚本.当然,这个脚本很简单,使用的方法也很笨拙.不过,这仅仅是一个开始,等以后随着对vim语法的深入了解,会不断优化这个脚本的.先记录下来 &qu ...
- git如何从远程非master分支更新到本地对应分支
git如何从远程非master分支更新到本地对应分支 自己实例 正确步骤 如果本地有分支,那就删除本地分支 删除本地分支::git branch -d 2018_4_18_second 切换分支: g ...
- Vsftp权限控制(持续增加中)
把用户限制在自己的home目录中,例如限制用户Leon只能访问/home/Leon目录下的文件,不允许访问上级目录. 先打开配置文件 vi /etc/vsftpd/vsftpd.conf 第一种方法: ...