重装系统后,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的更多相关文章

  1. GIT将本地项目上传到Github(两种简单、方便的方法)

    GIT将本地项目上传到Github(两种简单.方便的方法) 一.第一种方法: 首先你需要一个github账号,所有还没有的话先去注册吧! https://github.com/ 我们使用git需要先安 ...

  2. 使用Git将本地项目上传到Github操作详解

    Git的安装就不说了. 一.建本地仓库 1.第一步:我们需要先创建一个本地的版本库(其实也就是一个文件夹). 你可以直接右击新建文件夹,也可以右击打开Git bash命令行窗口通过命令来创建. 反正就 ...

  3. idea git 把本地项目上传到github上

    创建一个项目,在项目文件夹下执行以下命令 第二种方法: 先在idea上创建一个项目 注意以上只是在本地建立了本地仓库,代码都放在本地仓库. 现在上传到github上 到此才上传成功

  4. 从零开始使用git将本地项目上传到GitHub

    直接进入主题 1. 注册GitHub(官网:https://github.com/),打开官网,右上角点击sign up注册按钮,进入注册界面,根据提示填写信息注册. ​

  5. 使用git工具将项目上传到github

    注册github账号 https://github.com/ 安装git工具: https://git-for-windows.github.io/ 上面的准备工作完成后,现在开始操作. 一.进入gi ...

  6. Git将本地项目上传到GitHub

    本文转载于:https://segmentfault.com/a/1190000011909294 https://www.cnblogs.com/cxk1995/p/5800196.html 我们使 ...

  7. 如何用命令将本地项目上传到github

    一.Git终端软件安装 1.下载windows上git终端,类似shell工具,下载地址:http://msysgit.github.io/ 2.安装方法,打开文件,一路点击Next即可 3.安装完成 ...

  8. mac下安装git,并将本地的项目上传到github

    mac下安装git 安装过程: 1.下载Git installer http://git-scm.com/downloads 2.下载之后打开,双击.pkg安装 3.打开终端,使用git --vers ...

  9. 如何通过Git GUI将自己本地的项目上传至Github

    最近在学习node.js和react,顺便复习了下AngluarJS相关的东西,写了些小demo想放在GitHub上,之前仅限于只申请了GitHub账号从没用过,今天花半天时间查资料认真学习Githu ...

随机推荐

  1. Django入门必知必会操作

    一.Django基础必备三件套 HttpRseponse 内部传入一个字符串参数,返回给浏览器. 在app目录下的views.py添加函数,添加函数之前必须在urls.py添加函数对应关系,否则访问不 ...

  2. Astyle 一键格式化项目代码

    代码格式化差异问题: 一个团队有多个开发,因开发习惯不同,开发时少添加了空格.换行等. 格式化代码时,一般会将整个文档格式化,代码提交时会发现未知的修改项. Astyle格式化工具 官网下载地址:Ar ...

  3. C#深入浅出之更多数据类型

    类型的划分        一个类型,要么是值类型,要么是引用类型.区别在于拷贝方式:值类型拷贝值,引用类型拷贝引用 值类型        值类型直接包含值.相当于每一个值类型都有自己单独的值: int ...

  4. LayUi 树形组件tree 实现懒加载模式,展开父节点时异步加载子节点数据

    LayUi框架中树形组件tree官方还在持续完善中,目前最新版本为v2.5.5 官方树形组件目前还不支持懒加载方式,之前我修改一版是通过reload重载实例方法填充子节点数据方式,因为递归页面元素时存 ...

  5. ABP入门教程5 - 界面调整

    点这里进入ABP入门教程目录 调整前 调整后 调整项 页面标题 把favicon.ico替换为指定Logo JD.CRS.Web.Mvc\wwwroot\favicon.ico 顶部工具栏 把logo ...

  6. RAID&LVM有关磁盘的故障

    目录 RAID&LVM有关磁盘的故障 RAID 注意:RAID硬盘失效处理--热备和热拔插 RAID实战 LVM介绍 磁盘故障 RAID&LVM有关磁盘的故障 RAID 好处:1.更多 ...

  7. SQL Server存储过程备份数据库的脚本-干货

    拿AAAAAAAA数据库为例子,除了汉字标注的替换真实的数据,其他都不动        CREATE proc [dbo].[p_log_backupAAAAAAAA]    @dbname sysn ...

  8. CheckBoxList选中某项,获取其它项是否是选中

    <div class="formControls col-xs-8 col-sm-9" style="margin-top:-15px;" id=&quo ...

  9. 迁移到MAC

    周末折腾了2天环境,主要是从windows迁移到mac上,提升逼格告别山寨,迈向专业化.首先,终于把pomelo的c客户端在xcode上跑起来了,至此已基本解决了网络连接问题.由于是第一次用mac开发 ...

  10. linux下编译时的默认库和头文件搜索路径

    链接库路径 默认的链接库路径,定义在搜索/etc/ld.so.conf下的一些路径,其包含了一些重要的系统位置:LIBRARY_PATH, 但如果定义了LD_LIBRARY_PATH, 动态库的搜索路 ...