git安装和项目上传到GitHub
重装系统后,Git安装也要来重来
下载
国内下载地址:https://npm.taobao.org/mirrors/git-for-windows
安装忽略
生成密钥
输入然后都是下一步,生成密钥,生成的在C:\Users\Admin\.ssh
ssh-keygen -t rsa -C "email@qq.com"
进入C:\Users\Admin\.ssh 打开git 代理输入
ssh-agent bash
然后
ssh-add ~/.ssh/id_rsa
复制,粘贴到github账号ssh密钥里
clip < ~/.ssh/id_rsa.pub
检查连接
ssh -T git@github.com
成功连接如图

上传项目
cd方式进入目录

提交注释和配置用户
git commit -m "first commit"
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Config file location
--global use global config file
--system use system config file
--local use repository config file
--worktree use per-worktree config file
-f, --file <file> use given config file
--blob <blob-id> read config from given blob object Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--get-urlmatch get value specific for the URL: section[.var] URL
--replace-all replace all matching variables: name value [value_regex]
--add add a new variable: name value
--unset remove a variable: name [value-regex]
--unset-all remove all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit open an editor
--get-color find the color configured: slot [default]
--get-colorbool find the color setting: slot [stdout-is-tty] Type
-t, --type <> value is given this type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
--expiry-date value is an expiry date Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup
--show-origin show origin of config (file, standard input, blob, command line)
--default <value> with --get, use default value when missing entry


代码关联到github
git remote add origin git@github.com:sunday123/bootstrap01.git
如果出现

就删掉远程的
git remote rm origin

提交
git push -u origin master
可能报错
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:s....'
用下面上传
git pull --rebase origin master

再
git push --set-upstream origin master

大功告成
git安装和项目上传到GitHub的更多相关文章
- GIT将本地项目上传到Github(两种简单、方便的方法)
GIT将本地项目上传到Github(两种简单.方便的方法) 一.第一种方法: 首先你需要一个github账号,所有还没有的话先去注册吧! https://github.com/ 我们使用git需要先安 ...
- 使用Git将本地项目上传到Github操作详解
Git的安装就不说了. 一.建本地仓库 1.第一步:我们需要先创建一个本地的版本库(其实也就是一个文件夹). 你可以直接右击新建文件夹,也可以右击打开Git bash命令行窗口通过命令来创建. 反正就 ...
- idea git 把本地项目上传到github上
创建一个项目,在项目文件夹下执行以下命令 第二种方法: 先在idea上创建一个项目 注意以上只是在本地建立了本地仓库,代码都放在本地仓库. 现在上传到github上 到此才上传成功
- 从零开始使用git将本地项目上传到GitHub
直接进入主题 1. 注册GitHub(官网:https://github.com/),打开官网,右上角点击sign up注册按钮,进入注册界面,根据提示填写信息注册.
- 使用git工具将项目上传到github
注册github账号 https://github.com/ 安装git工具: https://git-for-windows.github.io/ 上面的准备工作完成后,现在开始操作. 一.进入gi ...
- Git将本地项目上传到GitHub
本文转载于:https://segmentfault.com/a/1190000011909294 https://www.cnblogs.com/cxk1995/p/5800196.html 我们使 ...
- 如何用命令将本地项目上传到github
一.Git终端软件安装 1.下载windows上git终端,类似shell工具,下载地址:http://msysgit.github.io/ 2.安装方法,打开文件,一路点击Next即可 3.安装完成 ...
- mac下安装git,并将本地的项目上传到github
mac下安装git 安装过程: 1.下载Git installer http://git-scm.com/downloads 2.下载之后打开,双击.pkg安装 3.打开终端,使用git --vers ...
- 如何通过Git GUI将自己本地的项目上传至Github
最近在学习node.js和react,顺便复习了下AngluarJS相关的东西,写了些小demo想放在GitHub上,之前仅限于只申请了GitHub账号从没用过,今天花半天时间查资料认真学习Githu ...
随机推荐
- ABAP - AT END OF 的使用
TYPES: begin of ty_tab , num() type i, str() type c, end of ty_tab. data: gw_tab TYPE ty_tab , gt_ta ...
- centos7.2安装及管理docker
使用的操作系统是是centos7.2,按照官方的推荐的配置,把linux内核升级到3.8以上.安装步骤如下: 1.升级内核版本(包含aufs)cd /etc/yum.repos.dwget http: ...
- C#中 EF 性能优化
https://www.cnblogs.com/chenwolong/p/7531955.html EF使用AsNoTracking(),无跟踪查询技术(查询出来的数据不可以修改,如果你做了修改,你会 ...
- 随意看看AtomicInteger类和CAS
最近在读jdk源码,怎么说呢?感觉收获还行,比看框架源码舒服多了,一些以前就感觉很模糊的概念和一些类的用法也清楚了好多,举个很简单的例子,我在读Integer类的时候,发现了原来这个类自带缓存,看看如 ...
- 微信扫码登陆,qq登陆,微博登陆等第三方登陆成功后返回原来的页面并进行跳转
原理很简单,主要是利用到window.open的第二个属性,name 前端: 原来的网页给window命名为 window.name="single" window.open(“第 ...
- 【转载】C++编译过程
C++编译过程 C++ 编译过程在介绍编译器之前,先简单地说一下 C++ 的编译过程,以便理解编译器的工作.编译(compiling)并不意味着只创建仅仅一个可执行文件.创建一个可执行文件是一个多级过 ...
- RabbitMQ入门及其几种工作模式
1.简介 MQ全程Message Queue,用于应用程序和应用程序间进行通信.RabbitMQ采用Erlang编写,实现了AMQP(高级消息队列)协议,跨平台,支持各种主流的操作系统和多种客户端. ...
- 201871010121-王方《面向对象程序设计(Java)》第一周学习总结
项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/wf-001128/ 作 ...
- TeamyinyinFish-凡事遇则立
小组github地址: https://github.com/TeamyinyinFish 1.项目的总结反思 阿尔法迭代的时候我们只是理想的随意的选择了一个项目并且认为非常简单. 在第二轮迭代的时候 ...
- 一天两道PAT(1)
其实是从昨天开始刷的,备战一下PAT(乙级,菜鸡不解释,希望几个月下来能有长进吧),做了一下,发现自己的算法功底好差啊..... 先上题目 1. 字符串中必须仅有P, A, T这三种字符,不可以包含其 ...