第一次使用Git上传本地项目到github
看了好多帖子,终于在混乱中找到自己适合的方法。。。。。。
自我感觉这个比较简单。 先安装本地git,官方下载地址:http://git-scm.com/download/ 根据你自己的系统 下载对应版本。 Administrator@USER-20170816VX MINGW64 /g/project/10guang (桌面要提交的文件,右键选择git bash here)
$ git clone https://github.com/gaobing1252/web-app.git (使用仓库地址生成 web-app 目录,这个目录是在提交文件的里面,然后把文件里面要上传的内容都拷贝到生成的web-app下)
Cloning into 'web-app'...
warning: You appear to have cloned an empty repository. Administrator@USER-20170816VX MINGW64 /g/project/10guang
$ cd web-app (继续命令到web-app,从此处开始) Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git add . (注意这个 点 前面有空格的!)
warning: LF will be replaced by CRLF in home/home.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/jquery-1.6.2.min.js.
The file will have its original line endings in your working directory. Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git commit -m "提交文件"
[master (root-commit) fb02d25] 提交文件
93 files changed, 11020 insertions(+)
create mode 100644 .project
create mode 100644 css/easyLife/easyLife.css
create mode 100644 video/video.html
create mode 100644 "\346\226\207\346\241\243.txt" Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git remote add origin git@github.com:gaobing1252/web-app.git (origin 后面的地址是 ssh类型的,不是htttps!)
fatal: remote origin already exists. Administrator@USER-20170816VX MINGW64 /g/project/10guang/web-app (master)
$ git push -u origin master
Username for 'https://github.com': gaobing1252 (输入用户名,之后会弹出密码输入框;验证成功自动上传)
Enumerating objects: 108, done.
Counting objects: 100% (108/108), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (102/102), done.
Writing objects: 100% (108/108), 1.40 MiB | 82.00 KiB/s, done.
Total 108 (delta 8), reused 0 (delta 0)
remote: Resolving deltas: 100% (8/8), done.
To https://github.com/gaobing1252/web-app.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.(成功!)
这个每次上传都要输入账号密码,还有另一种绑定秘钥的。可我生成了几次也没成功。。。。
感觉输入账号密码也不麻烦。
第一次使用Git上传本地项目到github的更多相关文章
- 第一次使用Git上传本地项目到github上
对于程序原来说都听说过GitHub,GitHub有许多开源的的项目和一些前沿的技术.因为自己在刚刚开始使用Git把自己写的一些小dome放到GitHub上遇到许多的坑,这么长时间过去了,想对第一次使用 ...
- 用git上传本地项目到github上
首先确认自己已经安装了git,打开git bash,输入ssh-keygen -t rsa -C "自己的邮箱地址@XXX.com" ,生成自己的公钥与私钥 一路默认回车,会生 ...
- 第一次Git上传本地项目到github上 的命令
1.下载Git软件:https://git-scm.com/downloads, 2.下载之后安装就很简单了, 3.邮箱注册 在git bash界面输入如下内容即可完成邮箱的注册: $ git con ...
- git上传本地项目到github
git软件下载地址:https://git-scm.com/download/ 1. 在GitHub上建立项目登录GitHub后,你可以在右边靠中那里找到一个按钮“New Repository”,点击 ...
- 【转】如何使用Git上传本地项目到github?(mac版)
原文链接:http://www.cnblogs.com/lijiayi/p/pushtogithub.html 在此假设你已经在 github 上创建好了一个项目,像这样: 并且你已经完成了自己的项目 ...
- 【 js 工具 】如何使用Git上传本地项目到github?(mac版)
在此假设你已经在 github 上创建好了一个项目,像这样: 并且你已经完成了自己的项目代码, 同时你也已经安装了 git,然后 let's start. 首先,建一个文件夹比如文中演示的是 微信小程 ...
- Git 上传本地项目到Github
前提: 安装Git 注册并拥有Github账号 目录: 初始化本地目录位Git仓库 Github上创建仓库 本地生成SSH key,并添加到Github上 本地项目管理Github上远程项目 详细步骤 ...
- 转:git上传本地项目到github
转自:https://blog.csdn.net/Lucky_LXG/article/details/77849212 将本地项目上传到Github(两种简单.方便的方法) 一.第一种方法:首先你需要 ...
- git上传本地项目到github,方法2
第一步:去github上创建自己的Repository,创建页面如下图所示: 填写相应信息后点击create即可 Repository name: 仓库名称 Description(可选): 仓库描述 ...
随机推荐
- C语言字符数组与字符串
研究几个案例: 输出图案: #include <stdio.h> void main() { ][] = { {', ' ', ' '}, {', ' '}, {'}, {', ' '}, ...
- C语言实现一元多项式求积
#include <stdio.h>#include <stdlib.h>#include <math.h>typedef struct Node{ int ...
- 再学UML-UML用例建模解析(三)
2. 编写用例文档 绘制用例图只是完成了用例建模最基本也是最简单的一步,用例建模的核心在于编写用例文档,用例文档又称为用例规约或用例描述.顾名思义,用例文档是用于描述用例的文档,每一个用例对应于一个用 ...
- 【Spring开发】—— AOP之方法级拦截
前言: 前面介绍了Spring的核心模块以及相关的依赖注入等概念.这篇讲解一下spring的另一个重点,AOP面向切面编程. 说道AOP不得不提到几个概念: 切面:也就是我们自己的一些业务方法. 通知 ...
- 我是一只IT小小鸟读后感 Part 1
我是一只IT小小鸟读后感 Part 1 梦断计院 作为一个工科生,真的和作者想到一块去了.在科大这个环境下,GPA成了衡量一个学生优秀与否的唯一因素,而真正对于编程和技术性的东西有兴趣的,往往被埋没在 ...
- [原]Android打包之Ant打包
Android自动打包流程详细图: 使用Ant打包会简单很多,只要使用以下两个命令就可以搞定: android update project -p . --target android-18 ant ...
- postgres循环sql
CREATE OR replace function loop_addDevice(i integer) RETURNS integer as $$ declare count alias ; all ...
- POJ 1416 Shredding Company【dfs入门】
题目传送门:http://poj.org/problem?id=1416 Shredding Company Time Limit: 1000MS Memory Limit: 10000K Tot ...
- 安卓extends和implements
extends是继承类 implements是实现接口
- 在vue项目中的axios使用配置记录
默认vue项目中已经安装axios,基于element-ui开发,主要记录配置的相关. axiosConfig.js import Vue from 'vue' import axios from ' ...